[PATCH v2 5/9] workqueue: test WQ_UNBOUND explicitly in the hotplug loops
From: Breno Leitao
Date: Wed Aug 05 2026 - 10:59:41 EST
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@xxxxxxxxxx>
---
kernel/workqueue.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 7b20d459d6442..b6458ee53852f 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;
--
2.53.0-Meta