aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/workqueue.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/workqueue.c')
-rw-r--r--kernel/workqueue.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 558733801ac0..b59c946433f4 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -2138,6 +2138,10 @@ void flush_workqueue(struct workqueue_struct *wq)
2138 2138
2139 mutex_lock(&wq->flush_mutex); 2139 mutex_lock(&wq->flush_mutex);
2140 2140
2141 /* we might have raced, check again with mutex held */
2142 if (wq->first_flusher != &this_flusher)
2143 goto out_unlock;
2144
2141 wq->first_flusher = NULL; 2145 wq->first_flusher = NULL;
2142 2146
2143 BUG_ON(!list_empty(&this_flusher.list)); 2147 BUG_ON(!list_empty(&this_flusher.list));