diff options
Diffstat (limited to 'kernel/workqueue.c')
-rw-r--r-- | kernel/workqueue.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index e86733a8b344..f128b3becfe1 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c | |||
@@ -2476,7 +2476,16 @@ static void insert_wq_barrier(struct pool_workqueue *pwq, | |||
2476 | */ | 2476 | */ |
2477 | INIT_WORK_ONSTACK(&barr->work, wq_barrier_func); | 2477 | INIT_WORK_ONSTACK(&barr->work, wq_barrier_func); |
2478 | __set_bit(WORK_STRUCT_PENDING_BIT, work_data_bits(&barr->work)); | 2478 | __set_bit(WORK_STRUCT_PENDING_BIT, work_data_bits(&barr->work)); |
2479 | init_completion(&barr->done); | 2479 | |
2480 | /* | ||
2481 | * Explicitly init the crosslock for wq_barrier::done, make its lock | ||
2482 | * key a subkey of the corresponding work. As a result we won't | ||
2483 | * build a dependency between wq_barrier::done and unrelated work. | ||
2484 | */ | ||
2485 | lockdep_init_map_crosslock((struct lockdep_map *)&barr->done.map, | ||
2486 | "(complete)wq_barr::done", | ||
2487 | target->lockdep_map.key, 1); | ||
2488 | __init_completion(&barr->done); | ||
2480 | barr->task = current; | 2489 | barr->task = current; |
2481 | 2490 | ||
2482 | /* | 2491 | /* |