diff options
| author | Linus Walleij <linus.walleij@linaro.org> | 2020-03-27 22:36:17 +0100 |
|---|---|---|
| committer | Linus Walleij <linus.walleij@linaro.org> | 2020-03-27 22:36:17 +0100 |
| commit | 06dd3f31cb70035cbd3f507c11fd50e3089aeb81 (patch) | |
| tree | 98065919df104fba32191f2464f4193a998cd6a1 /kernel/workqueue.c | |
| parent | 82f04bfe2aff428b063eefd234679b2d693228ed (diff) | |
| parent | 16fbf79b0f83bc752cee8589279f1ebfe57b3b6e (diff) | |
Merge tag 'v5.6-rc7' into devel
Linux 5.6-rc7
Diffstat (limited to 'kernel/workqueue.c')
| -rw-r--r-- | kernel/workqueue.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 301db4406bc3..4e01c448b4b4 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -1411,14 +1411,16 @@ static void __queue_work(int cpu, struct workqueue_struct *wq, return; rcu_read_lock(); retry: - if (req_cpu == WORK_CPU_UNBOUND) - cpu = wq_select_unbound_cpu(raw_smp_processor_id()); - /* pwq which will be used unless @work is executing elsewhere */ - if (!(wq->flags & WQ_UNBOUND)) - pwq = per_cpu_ptr(wq->cpu_pwqs, cpu); - else + if (wq->flags & WQ_UNBOUND) { + if (req_cpu == WORK_CPU_UNBOUND) + cpu = wq_select_unbound_cpu(raw_smp_processor_id()); pwq = unbound_pwq_by_node(wq, cpu_to_node(cpu)); + } else { + if (req_cpu == WORK_CPU_UNBOUND) + cpu = raw_smp_processor_id(); + pwq = per_cpu_ptr(wq->cpu_pwqs, cpu); + } /* * If @work was previously on a different pool, it might still be |
