summaryrefslogtreecommitdiffstats
path: root/drivers/md/bcache/writeback.c
diff options
context:
space:
mode:
authorLi Lei <lilei@szsandstone.com>2022-09-19 18:16:43 +0200
committerJens Axboe <axboe@kernel.dk>2022-09-19 19:12:35 +0200
commit97d26ae764a43bfaf870312761a0a0f9b49b6351 (patch)
treefc0709cea905201095f20c822677bd647033ec24 /drivers/md/bcache/writeback.c
parentblock/drbd: remove unused w_start_resync declaration (diff)
downloadlinux-97d26ae764a43bfaf870312761a0a0f9b49b6351.tar.xz
linux-97d26ae764a43bfaf870312761a0a0f9b49b6351.zip
bcache: remove unnecessary flush_workqueue
All pending works will be drained by destroy_workqueue(), no need to call flush_workqueue() explicitly. Signed-off-by: Li Lei <lilei@szsandstone.com> Signed-off-by: Coly Li <colyli@suse.de> Link: https://lore.kernel.org/r/20220919161647.81238-2-colyli@suse.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/md/bcache/writeback.c')
-rw-r--r--drivers/md/bcache/writeback.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/md/bcache/writeback.c b/drivers/md/bcache/writeback.c
index 3f0ff3aab6f2..647661005176 100644
--- a/drivers/md/bcache/writeback.c
+++ b/drivers/md/bcache/writeback.c
@@ -801,10 +801,9 @@ static int bch_writeback_thread(void *arg)
}
}
- if (dc->writeback_write_wq) {
- flush_workqueue(dc->writeback_write_wq);
+ if (dc->writeback_write_wq)
destroy_workqueue(dc->writeback_write_wq);
- }
+
cached_dev_put(dc);
wait_for_kthread_stop();