summaryrefslogtreecommitdiff
path: root/kernel/workqueue.c
diff options
context:
space:
mode:
authorZqiang <qiang.zhang@linux.dev>2025-09-04 19:31:32 +0800
committerTejun Heo <tj@kernel.org>2025-09-04 06:17:52 -1000
commitfd5081f4ef3325b49d26e41b5976d1f34032ca9b (patch)
tree89cbd51cd105d3808712b277465b7dd6bc216057 /kernel/workqueue.c
parentb19a97d57c15643494ac8bfaaa35e3ee472d41da (diff)
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 <qiang.zhang@linux.dev> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel/workqueue.c')
-rw-r--r--kernel/workqueue.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index c6b79b3675c3..831754e90071 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;
}