]> www.infradead.org Git - users/hch/misc.git/commitdiff
md/md-bitmap: Add missing destroy_work_on_stack()
authorYuan Can <yuancan@huawei.com>
Tue, 5 Nov 2024 13:01:05 +0000 (21:01 +0800)
committerSong Liu <song@kernel.org>
Wed, 6 Nov 2024 05:06:51 +0000 (21:06 -0800)
This commit add missed destroy_work_on_stack() operations for
unplug_work.work in bitmap_unplug_async().

Fixes: a022325ab970 ("md/md-bitmap: add a new helper to unplug bitmap asynchrously")
Cc: stable@vger.kernel.org
Signed-off-by: Yuan Can <yuancan@huawei.com>
Reviewed-by: Yu Kuai <yukuai3@huawei.com>
Link: https://lore.kernel.org/r/20241105130105.127336-1-yuancan@huawei.com
Signed-off-by: Song Liu <song@kernel.org>
drivers/md/md-bitmap.c

index 29da10e6f703e207b96a3d66ce712e0e0853877d..c3a42dd66ce5514c7900059acfc80f8c8b312a1a 100644 (file)
@@ -1285,6 +1285,7 @@ static void bitmap_unplug_async(struct bitmap *bitmap)
 
        queue_work(md_bitmap_wq, &unplug_work.work);
        wait_for_completion(&done);
+       destroy_work_on_stack(&unplug_work.work);
 }
 
 static void bitmap_unplug(struct mddev *mddev, bool sync)