public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Coly Li <colyli@suse.de>
To: axboe@kernel.dk
Cc: linux-bcache@vger.kernel.org, linux-block@vger.kernel.org,
	Li Lei <lilei@szsandstone.com>, Coly Li <colyli@suse.de>
Subject: [PATCH 1/5] bcache: remove unnecessary flush_workqueue
Date: Tue, 20 Sep 2022 00:16:43 +0800	[thread overview]
Message-ID: <20220919161647.81238-2-colyli@suse.de> (raw)
In-Reply-To: <20220919161647.81238-1-colyli@suse.de>

From: Li Lei <lilei@szsandstone.com>

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>
---
 drivers/md/bcache/writeback.c | 5 ++---
 1 file 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();
 
-- 
2.35.3


  reply	other threads:[~2022-09-19 16:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-19 16:16 [PATCH 0/5] bcache patches for Linux v6.1 Coly Li
2022-09-19 16:16 ` Coly Li [this message]
2022-09-19 16:16 ` [PATCH 2/5] bcache: remove unused bch_mark_cache_readahead function def in stats.h Coly Li
2022-09-19 16:16 ` [PATCH 3/5] bcache: bset: Fix comment typos Coly Li
2022-09-19 16:16 ` [PATCH 4/5] bcache:: fix repeated words in comments Coly Li
2022-09-19 16:16 ` [PATCH 5/5] bcache: fix set_at_max_writeback_rate() for multiple attached devices Coly Li
2022-09-19 17:12 ` [PATCH 0/5] bcache patches for Linux v6.1 Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220919161647.81238-2-colyli@suse.de \
    --to=colyli@suse.de \
    --cc=axboe@kernel.dk \
    --cc=lilei@szsandstone.com \
    --cc=linux-bcache@vger.kernel.org \
    --cc=linux-block@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox