]> git.baikalelectronics.ru Git - kernel.git/commit
dm: remove flush_scheduled_work() during local_exit()
authorMike Snitzer <snitzer@kernel.org>
Tue, 14 Feb 2023 18:06:05 +0000 (13:06 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 11 Mar 2023 15:43:47 +0000 (16:43 +0100)
commit1629c200eaf84c99d4fed17f6d1f7d0780aca38f
treeece7f45d4e484e0e6d434ee45fabaf3e13caec7a
parentca00f64541ce134bc6fd8fb8f85fd588dbe5c063
dm: remove flush_scheduled_work() during local_exit()

[ Upstream commit 0b22ff5360f5c4e11050b89206370fdf7dc0a226 ]

Commit f83c9614c33ba ("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 5a44612048f ("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: f83c9614c33ba ("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>
drivers/md/dm.c