mirror of
https://github.com/torvalds/linux.git
synced 2026-01-24 23:16:46 +00:00
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>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user