Message ID | 1457483454-30115-4-git-send-email-kamal@canonical.com |
---|---|
State | New |
Headers | show |
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index e80693f..82d0c8d 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -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); } /**