aboutsummaryrefslogtreecommitdiff
path: root/kernel/workqueue.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-12-12 08:15:13 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2012-12-12 08:15:13 -0800
commite7b55b8fcd3a32ba1f95ccd95fb9a11ccfa63563 (patch)
tree04d6191dcc1110074c48d569747e3ac94b595f45 /kernel/workqueue.c
parent50851c6248e1a13c45d97c41f6ebcf716093aa5e (diff)
parent3657600040a7279e52252af3f9d7e253f4f49ef0 (diff)
Merge branch 'for-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq
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()
Diffstat (limited to 'kernel/workqueue.c')
-rw-r--r--kernel/workqueue.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 1dae900df79..fbc6576a83c 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -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);