Skip to contentSkip to conversation

workqueue: Remove unused assert_rcu_or_wq_mutex_or_pool_mutex

PATCH Applied zhangjiao2 3 participants 3 messages Nov 10, 2025 Workqueue

lore
Share & tools
lore

zhangjiao2

author
#0 lore raw

PATCH 1/1 workqueue: Remove unused assert_rcu_or_wq_mutex_or_pool_mutex

From: zhang jiao <[email protected]>

assert_rcu_or_wq_mutex_or_pool_mutex is never referenced in the code. Just remove it.

---
 kernel/workqueue.c | 6 ------
 1 file changed, 6 deletions(-)
kernel/workqueue.c +0 -6
index c6b79b3675c3..a86889d8218b 100644
@@ -539,12 +539,6 @@ static void show_one_worker_pool(struct worker_pool *pool);
 			 !lockdep_is_held(&wq_pool_mutex),		\
 			 "RCU or wq_pool_mutex should be held")
 
-#define assert_rcu_or_wq_mutex_or_pool_mutex(wq)			\
-	RCU_LOCKDEP_WARN(!rcu_read_lock_any_held() &&			\
-			 !lockdep_is_held(&wq->mutex) &&		\
-			 !lockdep_is_held(&wq_pool_mutex),		\
-			 "RCU, wq->mutex or wq_pool_mutex should be held")
-
 #define for_each_bh_worker_pool(pool, cpu)				\
 	for ((pool) = &per_cpu(bh_worker_pools, cpu)[0];		\
 	     (pool) < &per_cpu(bh_worker_pools, cpu)[NR_STD_WORKER_POOLS]; \
Signature · 1 line
2.33.0
reviewer Reviewed-by on v1 1/1
#1 lore raw

Hello,

Quoted 16 lines · On Mon, Nov 10, 2025 at 9:26 AM zhangjiao2 <[email protected]>…

From: zhang jiao <[email protected]>

assert_rcu_or_wq_mutex_or_pool_mutex is never referenced in the code. Just remove it.

---
 kernel/workqueue.c | 6 ------
 1 file changed, 6 deletions(-)
kernel/workqueue.c +0 -0
index c6b79b3675c3..a86889d8218b 100644

kernel/workqueue.c static void show_one_worker_pool(struct worker_pool *pool); · line 547

Quoted 9 lines
kernel/workqueue.c +0 -6
@@ -539,12 +539,6 @@ static void show_one_worker_pool(struct worker_pool *pool);
                         !lockdep_is_held(&wq_pool_mutex),              \
                         "RCU or wq_pool_mutex should be held")
 
-#define assert_rcu_or_wq_mutex_or_pool_mutex(wq)                       \
-       RCU_LOCKDEP_WARN(!rcu_read_lock_any_held() &&                   \
-                        !lockdep_is_held(&wq->mutex) &&                \
-                        !lockdep_is_held(&wq_pool_mutex),              \
-                        "RCU, wq->mutex or wq_pool_mutex should be held")
-

Thanks
Lai