Commit fd5081f4 authored by Zqiang's avatar Zqiang Committed by Tejun Heo
Browse files

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: default avatarZqiang <qiang.zhang@linux.dev>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent b19a97d5
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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;
}