Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 365535
b: refs/heads/master
c: 87fc741
h: refs/heads/master
i:
  365533: ba62104
  365531: 12186d2
  365527: 96dfe00
  365519: 0bc4787
  365503: 6d2c682
v: v3
  • Loading branch information
Lai Jiangshan authored and Tejun Heo committed Mar 25, 2013
1 parent 279b86a commit 2dea5ca
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 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: 3c25a55daadc7e7058926f5728fba7721d824ffb
refs/heads/master: 87fc741e94cf64445c698486982b30afa0811eca
12 changes: 6 additions & 6 deletions trunk/kernel/workqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ struct wq_device;
* the appropriate worker_pool through its pool_workqueues.
*/
struct workqueue_struct {
unsigned int flags; /* PL: WQ_* flags */
unsigned int flags; /* WQ: WQ_* flags */
struct pool_workqueue __percpu *cpu_pwqs; /* I: per-cpu pwq's */
struct list_head pwqs; /* WR: all pwqs of this wq */
struct list_head list; /* PL: list of all workqueues */
Expand All @@ -242,7 +242,7 @@ struct workqueue_struct {
struct list_head maydays; /* MD: pwqs requesting rescue */
struct worker *rescuer; /* I: rescue worker */

int nr_drainers; /* PL: drain in progress */
int nr_drainers; /* WQ: drain in progress */
int saved_max_active; /* PW: saved pwq max_active */

#ifdef CONFIG_SYSFS
Expand Down Expand Up @@ -2684,10 +2684,10 @@ void drain_workqueue(struct workqueue_struct *wq)
* hotter than drain_workqueue() and already looks at @wq->flags.
* Use __WQ_DRAINING so that queue doesn't have to check nr_drainers.
*/
mutex_lock(&wq_pool_mutex);
mutex_lock(&wq->mutex);
if (!wq->nr_drainers++)
wq->flags |= __WQ_DRAINING;
mutex_unlock(&wq_pool_mutex);
mutex_unlock(&wq->mutex);
reflush:
flush_workqueue(wq);

Expand All @@ -2714,10 +2714,10 @@ void drain_workqueue(struct workqueue_struct *wq)

local_irq_enable();

mutex_lock(&wq_pool_mutex);
mutex_lock(&wq->mutex);
if (!--wq->nr_drainers)
wq->flags &= ~__WQ_DRAINING;
mutex_unlock(&wq_pool_mutex);
mutex_unlock(&wq->mutex);
}
EXPORT_SYMBOL_GPL(drain_workqueue);

Expand Down

0 comments on commit 2dea5ca

Please sign in to comment.