linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] block: Remove the redundant empty list check in blk_flush_plug
       [not found] <CGME20211108151030eucas1p257602208c9a532f3d0e002d7a81b308b@eucas1p2.samsung.com>
@ 2021-11-08 15:10 ` Pankaj Raghav
  0 siblings, 0 replies; only message in thread
From: Pankaj Raghav @ 2021-11-08 15:10 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-block, Pankaj Raghav, Pankaj Raghav

The callee: blk_mq_flush_plug_list already has an empty list check for
plug->mq_list. Remove the check for empty list from the
caller:blk_flush_plug.

Signed-off-by: Pankaj Raghav <p.raghav@samsung.com>
---
 block/blk-core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/block/blk-core.c b/block/blk-core.c
index b043de2baaac..a309e7cca218 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -1588,8 +1588,8 @@ void blk_flush_plug(struct blk_plug *plug, bool from_schedule)
 {
 	if (!list_empty(&plug->cb_list))
 		flush_plug_callbacks(plug, from_schedule);
-	if (!rq_list_empty(plug->mq_list))
-		blk_mq_flush_plug_list(plug, from_schedule);
+
+	blk_mq_flush_plug_list(plug, from_schedule);
 	/*
 	 * Unconditionally flush out cached requests, even if the unplug
 	 * event came from schedule. Since we know hold references to the
-- 
2.25.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-11-08 15:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20211108151030eucas1p257602208c9a532f3d0e002d7a81b308b@eucas1p2.samsung.com>
2021-11-08 15:10 ` [PATCH v2] block: Remove the redundant empty list check in blk_flush_plug Pankaj Raghav

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).