Skip to content

Commit 8eb17dc

Browse files
Waiman-Longhtejun
authored andcommitted
workqueue: Skip __WQ_DESTROYING workqueues when updating global unbound cpumask
Skip updating workqueues with __WQ_DESTROYING bit set when updating global unbound cpumask to avoid unnecessary work and other complications. Signed-off-by: Waiman Long <longman@redhat.com> Signed-off-by: Tejun Heo <tj@kernel.org>
1 parent 96068b6 commit 8eb17dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/workqueue.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6501,7 +6501,7 @@ static int workqueue_apply_unbound_cpumask(const cpumask_var_t unbound_cpumask)
65016501
lockdep_assert_held(&wq_pool_mutex);
65026502

65036503
list_for_each_entry(wq, &workqueues, list) {
6504-
if (!(wq->flags & WQ_UNBOUND))
6504+
if (!(wq->flags & WQ_UNBOUND) || (wq->flags & __WQ_DESTROYING))
65056505
continue;
65066506

65076507
/* creating multiple pwqs breaks ordering guarantee */

0 commit comments

Comments
 (0)