From: Pankaj Raghav <pankydev8@gmail.com>
To: axboe@kernel.dk
Cc: linux-block@vger.kernel.org, p.raghav@samsung.com,
joshi.k@samsung.com, javier.gonz@samsung.com
Subject: [PATCH] block: Remove the redundant empty list check in blk_flush_plug_list
Date: Tue, 12 Oct 2021 09:42:43 +0200 [thread overview]
Message-ID: <20211012074243.jygb7sqlheoi6ytv@quentin> (raw)
The callee: blk_mq_flush_plug_list already has an empty list check for
plug->mq_list. Hence, removed the check for empty list from the caller.
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 9b8c70670190..db28e2261825 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -1724,8 +1724,8 @@ void blk_flush_plug_list(struct blk_plug *plug, bool from_schedule)
{
flush_plug_callbacks(plug, from_schedule);
- if (!list_empty(&plug->mq_list))
- blk_mq_flush_plug_list(plug, from_schedule);
+ blk_mq_flush_plug_list(plug, from_schedule);
+
if (unlikely(!from_schedule && plug->cached_rq))
blk_mq_free_plug_rqs(plug);
}
--
2.25.1
reply other threads:[~2021-10-12 7:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20211012074243.jygb7sqlheoi6ytv@quentin \
--to=pankydev8@gmail.com \
--cc=axboe@kernel.dk \
--cc=javier.gonz@samsung.com \
--cc=joshi.k@samsung.com \
--cc=linux-block@vger.kernel.org \
--cc=p.raghav@samsung.com \
/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