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>pull/816/head
parent
96068b6030
commit
8eb17dc1a6
|
|
@ -6501,7 +6501,7 @@ static int workqueue_apply_unbound_cpumask(const cpumask_var_t unbound_cpumask)
|
||||||
lockdep_assert_held(&wq_pool_mutex);
|
lockdep_assert_held(&wq_pool_mutex);
|
||||||
|
|
||||||
list_for_each_entry(wq, &workqueues, list) {
|
list_for_each_entry(wq, &workqueues, list) {
|
||||||
if (!(wq->flags & WQ_UNBOUND))
|
if (!(wq->flags & WQ_UNBOUND) || (wq->flags & __WQ_DESTROYING))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* creating multiple pwqs breaks ordering guarantee */
|
/* creating multiple pwqs breaks ordering guarantee */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue