Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 263833
b: refs/heads/master
c: fa2563e
h: refs/heads/master
i:
  263831: cb9693e
v: v3
  • Loading branch information
Thomas Tuttle authored and Linus Torvalds committed Sep 15, 2011
1 parent cea9526 commit e5a9080
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 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: df4e33ad249b7480d6ba5dd11fc1dac5cfaffce1
refs/heads/master: fa2563e41c3d6d6e8af437643981ed28ae0cb56d
7 changes: 6 additions & 1 deletion trunk/kernel/workqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -2412,8 +2412,13 @@ void drain_workqueue(struct workqueue_struct *wq)

for_each_cwq_cpu(cpu, wq) {
struct cpu_workqueue_struct *cwq = get_cwq(cpu, wq);
bool drained;

if (!cwq->nr_active && list_empty(&cwq->delayed_works))
spin_lock_irq(&cwq->gcwq->lock);
drained = !cwq->nr_active && list_empty(&cwq->delayed_works);
spin_unlock_irq(&cwq->gcwq->lock);

if (drained)
continue;

if (++flush_cnt == 10 ||
Expand Down

0 comments on commit e5a9080

Please sign in to comment.