summaryrefslogtreecommitdiffstats
path: root/kernel/workqueue.c
diff options
context:
space:
mode:
authorTejun Heo2013-03-12 19:30:04 +0100
committerTejun Heo2013-03-12 19:30:04 +0100
commit618b01eb426dd2d73a4b5e5ebc6379e4eee3b123 (patch)
tree9068381e7a25dde3d4d72fd8b9fe8a814bc85efe /kernel/workqueue.c
parentworkqueue: implement apply_workqueue_attrs() (diff)
downloadkernel-qcow2-linux-618b01eb426dd2d73a4b5e5ebc6379e4eee3b123.tar.gz
kernel-qcow2-linux-618b01eb426dd2d73a4b5e5ebc6379e4eee3b123.tar.xz
kernel-qcow2-linux-618b01eb426dd2d73a4b5e5ebc6379e4eee3b123.zip
workqueue: make it clear that WQ_DRAINING is an internal flag
We're gonna add another internal WQ flag. Let's make the distinction clear. Prefix WQ_DRAINING with __ and move it to bit 16. Signed-off-by: Tejun Heo <tj@kernel.org> Reviewed-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Diffstat (limited to 'kernel/workqueue.c')
-rw-r--r--kernel/workqueue.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 2a67fbbd192c..590f4d048ec7 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -1225,7 +1225,7 @@ static void __queue_work(int cpu, struct workqueue_struct *wq,
debug_work_activate(work);
/* if dying, only works from the same workqueue are allowed */
- if (unlikely(wq->flags & WQ_DRAINING) &&
+ if (unlikely(wq->flags & __WQ_DRAINING) &&
WARN_ON_ONCE(!is_chained_work(wq)))
return;
retry:
@@ -2763,11 +2763,11 @@ void drain_workqueue(struct workqueue_struct *wq)
/*
* __queue_work() needs to test whether there are drainers, is much
* hotter than drain_workqueue() and already looks at @wq->flags.
- * Use WQ_DRAINING so that queue doesn't have to check nr_drainers.
+ * Use __WQ_DRAINING so that queue doesn't have to check nr_drainers.
*/
spin_lock_irq(&workqueue_lock);
if (!wq->nr_drainers++)
- wq->flags |= WQ_DRAINING;
+ wq->flags |= __WQ_DRAINING;
spin_unlock_irq(&workqueue_lock);
reflush:
flush_workqueue(wq);
@@ -2795,7 +2795,7 @@ reflush:
spin_lock(&workqueue_lock);
if (!--wq->nr_drainers)
- wq->flags &= ~WQ_DRAINING;
+ wq->flags &= ~__WQ_DRAINING;
spin_unlock(&workqueue_lock);
local_irq_enable();