diff options
| author | Dave Airlie <airlied@redhat.com> | 2011-10-18 10:54:30 +0100 |
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2011-10-18 10:54:30 +0100 |
| commit | 017ed8012e74ca15748863f45d2c078453026a0a (patch) | |
| tree | 7071171a06de4e93fc890e0afce5c23596a26619 /kernel/workqueue.c | |
| parent | 80d9b24a658c83602aea66e45e2347c5bb3cbd47 (diff) | |
| parent | 899e3ee404961a90b828ad527573aaaac39f0ab1 (diff) | |
Merge tag 'v3.1-rc10' into drm-core-next
There are a number of fixes in mainline required for code in -next,
also there was a few conflicts I'd rather resolve myself.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Conflicts:
drivers/gpu/drm/radeon/evergreen.c
drivers/gpu/drm/radeon/r600.c
drivers/gpu/drm/radeon/radeon_asic.h
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 || |
