summaryrefslogtreecommitdiff
path: root/kernel/workqueue.c
diff options
context:
space:
mode:
authorWaiman Long <longman@redhat.com>2024-02-03 10:43:30 -0500
committerTejun Heo <tj@kernel.org>2024-02-05 07:52:22 -1000
commit8eb17dc1a6b5db7e89681f59285242af8d182f95 (patch)
treeccb2bcb58bbdfe121d2c16ce001d96e4887f46ad /kernel/workqueue.c
parent96068b6030391082bf0cd97af525d731afa5ad63 (diff)
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>
Diffstat (limited to 'kernel/workqueue.c')
-rw-r--r--kernel/workqueue.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index d7fdb631ecf7..68c48489eab3 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -6501,7 +6501,7 @@ static int workqueue_apply_unbound_cpumask(const cpumask_var_t unbound_cpumask)
lockdep_assert_held(&wq_pool_mutex);
list_for_each_entry(wq, &workqueues, list) {
- if (!(wq->flags & WQ_UNBOUND))
+ if (!(wq->flags & WQ_UNBOUND) || (wq->flags & __WQ_DESTROYING))
continue;
/* creating multiple pwqs breaks ordering guarantee */