From: Tejun Heo Date: Wed, 21 Feb 2024 05:36:13 +0000 (-1000) Subject: workqueue: Use rcu_read_lock_any_held() instead of rcu_read_lock_held() X-Git-Tag: v6.9-rc1~210^2~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d355001fa9370df8fdd6fca0e9ed77063615c7da;p=thirdparty%2Fkernel%2Fstable.git workqueue: Use rcu_read_lock_any_held() instead of rcu_read_lock_held() The different flavors of RCU read critical sections have been unified. Let's update the locking assertion macros accordingly to avoid requiring unnecessary explicit rcu_read_[un]lock() calls. Signed-off-by: Tejun Heo Reviewed-by: Lai Jiangshan --- diff --git a/kernel/workqueue.c b/kernel/workqueue.c index b280caf81fb29..87750e70b6383 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -515,12 +515,12 @@ static void show_one_worker_pool(struct worker_pool *pool); #include #define assert_rcu_or_pool_mutex() \ - RCU_LOCKDEP_WARN(!rcu_read_lock_held() && \ + RCU_LOCKDEP_WARN(!rcu_read_lock_any_held() && \ !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_held() && \ + 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")