summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@kernel.org>2023-02-14 13:06:05 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-03-11 16:31:42 +0100
commit4ae9a90d19649e2f9e9ce2d088be4b61c9db9cb3 (patch)
treef6b124e858d686ea890eece8c6c5ae538ed6dda9
parent167ca89e21be0a40cd16122679035553da1aa404 (diff)
downloadlinux-stable-4ae9a90d19649e2f9e9ce2d088be4b61c9db9cb3.tar.gz
linux-stable-4ae9a90d19649e2f9e9ce2d088be4b61c9db9cb3.tar.bz2
linux-stable-4ae9a90d19649e2f9e9ce2d088be4b61c9db9cb3.zip
dm: remove flush_scheduled_work() during local_exit()
[ Upstream commit 0b22ff5360f5c4e11050b89206370fdf7dc0a226 ] Commit acfe0ad74d2e1 ("dm: allocate a special workqueue for deferred device removal") switched from using system workqueue to a single workqueue local to DM. But it didn't eliminate the call to flush_scheduled_work() that was introduced purely for the benefit of deferred device removal with commit 2c140a246dc ("dm: allow remove to be deferred"). Since DM core uses its own workqueue (and queue_work) there is no need to call flush_scheduled_work() from local_exit(). local_exit()'s destroy_workqueue(deferred_remove_workqueue) handles flushing work started with queue_work(). Fixes: acfe0ad74d2e1 ("dm: allocate a special workqueue for deferred device removal") Signed-off-by: Mike Snitzer <snitzer@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/md/dm.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 324d1dd58e2b..3d9a77f4e20f 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -279,7 +279,6 @@ out_free_rq_tio_cache:
static void local_exit(void)
{
- flush_scheduled_work();
destroy_workqueue(deferred_remove_workqueue);
kmem_cache_destroy(_rq_cache);