diff mbox series

dm thin: Add missing destroy_work_on_stack()

Message ID 20241106010312.19697-1-yuancan@huawei.com (mailing list archive)
State Accepted, archived
Delegated to: Mikulas Patocka
Headers show
Series dm thin: Add missing destroy_work_on_stack() | expand

Commit Message

Yuan Can Nov. 6, 2024, 1:03 a.m. UTC
This commit add missed destroy_work_on_stack() operations for pw->worker in
pool_work_wait().

Fixes: e7a3e871d895 ("dm thin: cleanup noflush_work to use a proper completion")
Signed-off-by: Yuan Can <yuancan@huawei.com>
---
 drivers/md/dm-thin.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c
index 89632ce97760..c9f47d0cccf9 100644
--- a/drivers/md/dm-thin.c
+++ b/drivers/md/dm-thin.c
@@ -2484,6 +2484,7 @@  static void pool_work_wait(struct pool_work *pw, struct pool *pool,
 	init_completion(&pw->complete);
 	queue_work(pool->wq, &pw->worker);
 	wait_for_completion(&pw->complete);
+	destroy_work_on_stack(&pw->worker);
 }
 
 /*----------------------------------------------------------------*/