workqueue: Fold rebind_worker() within rebind_workers()
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2182337 commit c63a2e52d5e08f01140d7b76c08a78e15e801f03 Author: Valentin Schneider <vschneid@redhat.com> Date: Fri, 13 Jan 2023 17:40:40 +0000 workqueue: Fold rebind_worker() within rebind_workers() !CONFIG_SMP builds complain about rebind_worker() being unused. Its only user, rebind_workers() is indeed only defined for CONFIG_SMP, so just fold the two lines back up there. Link: http://lore.kernel.org/r/20230113143102.2e94d74f@canb.auug.org.au Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Valentin Schneider <vschneid@redhat.com> Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Waiman Long <longman@redhat.com>
This commit is contained in:
parent
107339e408
commit
8cbdd24861
|
@ -1985,12 +1985,6 @@ static void unbind_worker(struct worker *worker)
|
|||
WARN_ON_ONCE(set_cpus_allowed_ptr(worker->task, cpu_possible_mask) < 0);
|
||||
}
|
||||
|
||||
static void rebind_worker(struct worker *worker, struct worker_pool *pool)
|
||||
{
|
||||
kthread_set_per_cpu(worker->task, pool->cpu);
|
||||
WARN_ON_ONCE(set_cpus_allowed_ptr(worker->task, pool->attrs->cpumask) < 0);
|
||||
}
|
||||
|
||||
static void wake_dying_workers(struct list_head *cull_list)
|
||||
{
|
||||
struct worker *worker, *tmp;
|
||||
|
@ -5148,8 +5142,11 @@ static void rebind_workers(struct worker_pool *pool)
|
|||
* of all workers first and then clear UNBOUND. As we're called
|
||||
* from CPU_ONLINE, the following shouldn't fail.
|
||||
*/
|
||||
for_each_pool_worker(worker, pool)
|
||||
rebind_worker(worker, pool);
|
||||
for_each_pool_worker(worker, pool) {
|
||||
kthread_set_per_cpu(worker->task, pool->cpu);
|
||||
WARN_ON_ONCE(set_cpus_allowed_ptr(worker->task,
|
||||
pool->attrs->cpumask) < 0);
|
||||
}
|
||||
|
||||
raw_spin_lock_irq(&pool->lock);
|
||||
|
||||
|
|
Loading…
Reference in New Issue