]> git.itanic.dy.fi Git - linux-stable/commitdiff
Revert "workqueue: make sure delayed work run in local cpu"
authorSasha Levin <sasha.levin@oracle.com>
Mon, 25 Jan 2016 12:00:06 +0000 (07:00 -0500)
committerSasha Levin <sasha.levin@oracle.com>
Mon, 25 Jan 2016 12:00:06 +0000 (07:00 -0500)
This reverts commit 1e7af294dd037af63e74fe13e2b6afb93105ed3f.

This commit is only needed on 4.1+

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
kernel/workqueue.c

index bd3c41d4ec0784c65f00509dc123894bf64d820d..2273f534b01aed7a616ac66994fc61d738877ada 100644 (file)
@@ -1442,13 +1442,13 @@ static void __queue_delayed_work(int cpu, struct workqueue_struct *wq,
        timer_stats_timer_set_start_info(&dwork->timer);
 
        dwork->wq = wq;
-       /* timer isn't guaranteed to run in this cpu, record earlier */
-       if (cpu == WORK_CPU_UNBOUND)
-               cpu = raw_smp_processor_id();
        dwork->cpu = cpu;
        timer->expires = jiffies + delay;
 
-       add_timer_on(timer, cpu);
+       if (unlikely(cpu != WORK_CPU_UNBOUND))
+               add_timer_on(timer, cpu);
+       else
+               add_timer(timer);
 }
 
 /**