From: Alasdair G Kergon Date: Tue, 12 Jul 2005 22:53:02 +0000 (-0700) Subject: [PATCH] device-mapper multipath: Flush workqueue when destroying X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a044d016896d2717694003f00d31a98194077511;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [PATCH] device-mapper multipath: Flush workqueue when destroying The multipath destructor must flush its workqueue. Otherwise items that reference the destroyed object could remain. From: "goggin, edward" Signed-off-by: Lars Marowsky-Bree Signed-off-by: Alasdair G Kergon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c index 84cdb700a247..fa72f0153206 100644 --- a/drivers/md/dm-mpath.c +++ b/drivers/md/dm-mpath.c @@ -752,6 +752,8 @@ static int multipath_ctr(struct dm_target *ti, unsigned int argc, static void multipath_dtr(struct dm_target *ti) { struct multipath *m = (struct multipath *) ti->private; + + flush_workqueue(kmultipathd); free_multipath(m); }