Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 365503
b: refs/heads/master
c: 618b01e
h: refs/heads/master
i:
  365501: f1e1d02
  365499: 983301e
  365495: 0dbcd85
  365487: 1a9a5a7
  365471: b528e8f
  365439: 1317529
v: v3
  • Loading branch information
Tejun Heo committed Mar 12, 2013
1 parent a2d78a0 commit 6d2c682
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9e8cd2f5898ab6710ad81f4583fada08bf8049a4
refs/heads/master: 618b01eb426dd2d73a4b5e5ebc6379e4eee3b123
2 changes: 1 addition & 1 deletion trunk/include/linux/workqueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ enum {
WQ_HIGHPRI = 1 << 4, /* high priority */
WQ_CPU_INTENSIVE = 1 << 5, /* cpu instensive workqueue */

WQ_DRAINING = 1 << 6, /* internal: workqueue is draining */
__WQ_DRAINING = 1 << 16, /* internal: workqueue is draining */

WQ_MAX_ACTIVE = 512, /* I like 512, better ideas? */
WQ_MAX_UNBOUND_PER_CPU = 4, /* 4 * #cpus for unbound wq */
Expand Down
8 changes: 4 additions & 4 deletions trunk/kernel/workqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -2795,7 +2795,7 @@ void drain_workqueue(struct workqueue_struct *wq)

spin_lock(&workqueue_lock);
if (!--wq->nr_drainers)
wq->flags &= ~WQ_DRAINING;
wq->flags &= ~__WQ_DRAINING;
spin_unlock(&workqueue_lock);

local_irq_enable();
Expand Down

0 comments on commit 6d2c682

Please sign in to comment.