Merge branch 'for-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 12 Dec 2012 16:15:13 +0000 (08:15 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 12 Dec 2012 16:15:13 +0000 (08:15 -0800)
Pull workqueue changes from Tejun Heo:
 "Nothing exciting.  Just two trivial changes."

* 'for-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
  workqueue: add WARN_ON_ONCE() on CPU number to wq_worker_waking_up()
  workqueue: trivial fix for return statement in work_busy()

kernel/workqueue.c

index 1dae900df798d1c4e1be722567fd2906041f08f5..fbc6576a83c3e6837df8f9912963aadad2860a06 100644 (file)
@@ -739,8 +739,10 @@ void wq_worker_waking_up(struct task_struct *task, unsigned int cpu)
 {
        struct worker *worker = kthread_data(task);
 
-       if (!(worker->flags & WORKER_NOT_RUNNING))
+       if (!(worker->flags & WORKER_NOT_RUNNING)) {
+               WARN_ON_ONCE(worker->pool->gcwq->cpu != cpu);
                atomic_inc(get_pool_nr_running(worker->pool));
+       }
 }
 
 /**
@@ -3485,7 +3487,7 @@ unsigned int work_busy(struct work_struct *work)
        unsigned int ret = 0;
 
        if (!gcwq)
-               return false;
+               return 0;
 
        spin_lock_irqsave(&gcwq->lock, flags);