]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
dm thin: Add missing destroy_work_on_stack()
authorYuan Can <yuancan@huawei.com>
Wed, 6 Nov 2024 01:03:12 +0000 (09:03 +0800)
committerMikulas Patocka <mpatocka@redhat.com>
Wed, 20 Nov 2024 10:38:05 +0000 (11:38 +0100)
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")
Cc: stable@vger.kernel.org
Signed-off-by: Yuan Can <yuancan@huawei.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
drivers/md/dm-thin.c

index 89632ce9776056aee6ab7d6f207ba24f7f6ddff6..c9f47d0cccf9bb3c617be5d5b7e647a99a5df491 100644 (file)
@@ -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);
 }
 
 /*----------------------------------------------------------------*/