aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/workqueue.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/workqueue.c')
-rw-r--r--kernel/workqueue.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index aa520e715bbc..661184fcd503 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -2652,6 +2652,9 @@ void flush_workqueue(struct workqueue_struct *wq)
2652 if (WARN_ON(!wq_online)) 2652 if (WARN_ON(!wq_online))
2653 return; 2653 return;
2654 2654
2655 lock_map_acquire(&wq->lockdep_map);
2656 lock_map_release(&wq->lockdep_map);
2657
2655 mutex_lock(&wq->mutex); 2658 mutex_lock(&wq->mutex);
2656 2659
2657 /* 2660 /*
@@ -2905,6 +2908,11 @@ static bool __flush_work(struct work_struct *work, bool from_cancel)
2905 if (WARN_ON(!wq_online)) 2908 if (WARN_ON(!wq_online))
2906 return false; 2909 return false;
2907 2910
2911 if (!from_cancel) {
2912 lock_map_acquire(&work->lockdep_map);
2913 lock_map_release(&work->lockdep_map);
2914 }
2915
2908 if (start_flush_work(work, &barr, from_cancel)) { 2916 if (start_flush_work(work, &barr, from_cancel)) {
2909 wait_for_completion(&barr.done); 2917 wait_for_completion(&barr.done);
2910 destroy_work_on_stack(&barr.work); 2918 destroy_work_on_stack(&barr.work);