diff options
| author | Arnd Bergmann <arnd@arndb.de> | 2011-10-20 18:32:02 +0200 |
|---|---|---|
| committer | Arnd Bergmann <arnd@arndb.de> | 2011-10-20 18:32:02 +0200 |
| commit | 91056a63a7d8dbc817747a22d9a9490463323575 (patch) | |
| tree | a220d265d01075c05f4cd35d998e65849bb47bc8 /kernel/workqueue.c | |
| parent | 05d900c9d8ce536c6792efb323c82b1c97b54bf9 (diff) | |
| parent | f2d8df92f69b8c719ca1a46d2615b168b2cc9cdf (diff) | |
Merge branch 'imx-cleanups-for-arnd' of git://git.pengutronix.de/git/imx/linux-2.6 into imx/cleanup
Diffstat (limited to 'kernel/workqueue.c')
| -rw-r--r-- | kernel/workqueue.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 25fb1b0e53f..1783aabc612 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -2412,8 +2412,13 @@ reflush: 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 || |
