From: Li Lei Date: Mon, 19 Sep 2022 16:16:43 +0000 (+0800) Subject: bcache: remove unnecessary flush_workqueue X-Git-Tag: v6.1-rc1~134^2~65 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=97d26ae764a43bfaf870312761a0a0f9b49b6351;p=thirdparty%2Flinux.git 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 Signed-off-by: Coly Li Link: https://lore.kernel.org/r/20220919161647.81238-2-colyli@suse.de Signed-off-by: Jens Axboe --- diff --git a/drivers/md/bcache/writeback.c b/drivers/md/bcache/writeback.c index 3f0ff3aab6f23..6476610051767 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();