diff options
| author | Breno Leitao <leitao@debian.org> | 2026-08-05 07:52:34 -0700 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2026-08-10 11:47:20 -1000 |
| commit | f784d9ce8d0202805c0bee7dfb820d404779ad63 (patch) | |
| tree | 0f63dd07c89ca0ab08767e4cab50f4c9d6c08779 /kernel/workqueue.c | |
| parent | 464e454e1cb4c22836fd7d1a17b3c3b11f47d989 (diff) | |
workqueue: allocate attrs for all workqueues
The attrs are where the affinity scope lives, and a per-cpu workqueue
will need one once per-cpu becomes a scope rather than a separate
backend. Allocate them unconditionally.
wq_dump.py used a non-NULL wq->attrs as its test for an unbound
workqueue, which no longer holds; test WQ_UNBOUND there instead.
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.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index fbe13c9be4c2..e13f223e8502 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -5902,11 +5902,9 @@ static struct workqueue_struct *__alloc_workqueue(const char *fmt, if (!wq) return NULL; - if (flags & WQ_UNBOUND) { - wq->attrs = alloc_workqueue_attrs_noprof(); - if (!wq->attrs) - goto err_free_wq; - } + wq->attrs = alloc_workqueue_attrs_noprof(); + if (!wq->attrs) + goto err_free_wq; name_len = vsnprintf(wq->name, sizeof(wq->name), fmt, args); |
