diff options
Diffstat (limited to 'kernel/workqueue.c')
-rw-r--r-- | kernel/workqueue.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index c9dd5fbdbf33..ef071ca73fc3 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c | |||
@@ -4369,8 +4369,8 @@ static void show_pwq(struct pool_workqueue *pwq) | |||
4369 | /** | 4369 | /** |
4370 | * show_workqueue_state - dump workqueue state | 4370 | * show_workqueue_state - dump workqueue state |
4371 | * | 4371 | * |
4372 | * Called from a sysrq handler and prints out all busy workqueues and | 4372 | * Called from a sysrq handler or try_to_freeze_tasks() and prints out |
4373 | * pools. | 4373 | * all busy workqueues and pools. |
4374 | */ | 4374 | */ |
4375 | void show_workqueue_state(void) | 4375 | void show_workqueue_state(void) |
4376 | { | 4376 | { |
@@ -4600,15 +4600,11 @@ static void restore_unbound_workers_cpumask(struct worker_pool *pool, int cpu) | |||
4600 | if (!cpumask_test_cpu(cpu, pool->attrs->cpumask)) | 4600 | if (!cpumask_test_cpu(cpu, pool->attrs->cpumask)) |
4601 | return; | 4601 | return; |
4602 | 4602 | ||
4603 | /* is @cpu the only online CPU? */ | ||
4604 | cpumask_and(&cpumask, pool->attrs->cpumask, cpu_online_mask); | 4603 | cpumask_and(&cpumask, pool->attrs->cpumask, cpu_online_mask); |
4605 | if (cpumask_weight(&cpumask) != 1) | ||
4606 | return; | ||
4607 | 4604 | ||
4608 | /* as we're called from CPU_ONLINE, the following shouldn't fail */ | 4605 | /* as we're called from CPU_ONLINE, the following shouldn't fail */ |
4609 | for_each_pool_worker(worker, pool) | 4606 | for_each_pool_worker(worker, pool) |
4610 | WARN_ON_ONCE(set_cpus_allowed_ptr(worker->task, | 4607 | WARN_ON_ONCE(set_cpus_allowed_ptr(worker->task, &cpumask) < 0); |
4611 | pool->attrs->cpumask) < 0); | ||
4612 | } | 4608 | } |
4613 | 4609 | ||
4614 | int workqueue_prepare_cpu(unsigned int cpu) | 4610 | int workqueue_prepare_cpu(unsigned int cpu) |