]> git.baikalelectronics.ru Git - kernel.git/commitdiff
bcache: remove unnecessary flush_workqueue
authorLi Lei <lilei@szsandstone.com>
Mon, 19 Sep 2022 16:16:43 +0000 (00:16 +0800)
committerJens Axboe <axboe@kernel.dk>
Mon, 19 Sep 2022 17:12:35 +0000 (11:12 -0600)
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>
drivers/md/bcache/writeback.c

index 3f0ff3aab6f231581696a10b4729e501a2f3b121..64766100517674f0d9fad19701ef67124a88edb2 100644 (file)
@@ -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();