summaryrefslogtreecommitdiff
path: root/kernel/workqueue.c
diff options
context:
space:
mode:
authorBreno Leitao <leitao@debian.org>2026-08-05 07:52:32 -0700
committerTejun Heo <tj@kernel.org>2026-08-10 11:47:19 -1000
commitdd55381120e2032f60806e2595ee70142fe22533 (patch)
treee32be7338cb13158808935ffbad839308e7faaa7 /kernel/workqueue.c
parentb72fdc651056cf66714e841bd6cc59907ab1858c (diff)
workqueue: test WQ_UNBOUND explicitly in the hotplug loops
workqueue_online_cpu() and workqueue_offline_cpu() decide whether a workqueue needs a pod affinity update by testing wq->unbound_attrs for NULL, which is only meaningful because the attrs are allocated for unbound workqueues alone. Test the flag instead, so the attrs can later be allocated for every workqueue. No functional change. Signed-off-by: Breno Leitao <leitao@debian.org> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel/workqueue.c')
-rw-r--r--kernel/workqueue.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 7b20d459d644..b6458ee53852 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -6945,7 +6945,7 @@ int workqueue_online_cpu(unsigned int cpu)
list_for_each_entry(wq, &workqueues, list) {
struct workqueue_attrs *attrs = wq->unbound_attrs;
- if (attrs) {
+ if (wq->flags & WQ_UNBOUND) {
const struct wq_pod_type *pt = wqattrs_pod_type(attrs);
int tcpu;
@@ -6980,7 +6980,7 @@ int workqueue_offline_cpu(unsigned int cpu)
list_for_each_entry(wq, &workqueues, list) {
struct workqueue_attrs *attrs = wq->unbound_attrs;
- if (attrs) {
+ if (wq->flags & WQ_UNBOUND) {
const struct wq_pod_type *pt = wqattrs_pod_type(attrs);
int tcpu;