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()

1  2 
kernel/workqueue.c

diff --combined kernel/workqueue.c
index 1dae900df798d1c4e1be722567fd2906041f08f5,ae9a05603e01ba5eb6cd004e70e796802c8cd1eb..fbc6576a83c3e6837df8f9912963aadad2860a06
@@@ -739,8 -739,10 +739,10 @@@ void wq_worker_waking_up(struct task_st
  {
        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));
+       }
  }
  
  /**
@@@ -1361,8 -1363,8 +1363,8 @@@ static void __queue_delayed_work(int cp
  
        WARN_ON_ONCE(timer->function != delayed_work_timer_fn ||
                     timer->data != (unsigned long)dwork);
 -      BUG_ON(timer_pending(timer));
 -      BUG_ON(!list_empty(&work->entry));
 +      WARN_ON_ONCE(timer_pending(timer));
 +      WARN_ON_ONCE(!list_empty(&work->entry));
  
        /*
         * If @delay is 0, queue @dwork->work immediately.  This is for
@@@ -3485,7 -3487,7 +3487,7 @@@ unsigned int work_busy(struct work_stru
        unsigned int ret = 0;
  
        if (!gcwq)
-               return false;
+               return 0;
  
        spin_lock_irqsave(&gcwq->lock, flags);