mirror of
https://github.com/torvalds/linux.git
synced 2026-09-13 15:40:03 +02:00
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>
This commit is contained in:
parent
b72fdc6510
commit
dd55381120
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user