From: Zqiang Date: Thu, 4 Sep 2025 11:31:32 +0000 (+0800) Subject: workqueue: Remove redundant rcu_read_lock/unlock() in workqueue_congested() X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fd5081f4ef3325b49d26e41b5976d1f34032ca9b;p=thirdparty%2Fkernel%2Fstable.git workqueue: Remove redundant rcu_read_lock/unlock() in workqueue_congested() The preempt_disable/enable() has already formed RCU read crtical section, this commit therefore remove rcu_read_lock/unlock() in workqueue_congested(). Signed-off-by: Zqiang Signed-off-by: Tejun Heo --- diff --git a/kernel/workqueue.c b/kernel/workqueue.c index c6b79b3675c31..831754e900714 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -6046,7 +6046,6 @@ bool workqueue_congested(int cpu, struct workqueue_struct *wq) struct pool_workqueue *pwq; bool ret; - rcu_read_lock(); preempt_disable(); if (cpu == WORK_CPU_UNBOUND) @@ -6056,7 +6055,6 @@ bool workqueue_congested(int cpu, struct workqueue_struct *wq) ret = !list_empty(&pwq->inactive_works); preempt_enable(); - rcu_read_unlock(); return ret; }