From: Baolin Wang <baolin.wang@linux.alibaba.com>
To: axboe@kernel.dk
Cc: ming.lei@redhat.com, baolin.wang@linux.alibaba.com,
baolin.wang7@gmail.com, linux-block@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] blk-mq: Remove unnecessary validation before calling blk_mq_sched_completed_request()
Date: Sat, 4 Jul 2020 15:28:21 +0800 [thread overview]
Message-ID: <969d0e9f637b2a0dbfb3d284abfbed6fc7665ea4.1593846855.git.baolin.wang7@gmail.com> (raw)
We've already validated the 'q->elevator' before calling ->ops.completed_request()
in blk_mq_sched_completed_request(), thus no need to validate rq->internal_tag again,
and remove it.
Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
---
block/blk-mq.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/block/blk-mq.c b/block/blk-mq.c
index abcf590f6238..78572b2e1675 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -550,8 +550,7 @@ inline void __blk_mq_end_request(struct request *rq, blk_status_t error)
blk_stat_add(rq, now);
}
- if (rq->internal_tag != BLK_MQ_NO_TAG)
- blk_mq_sched_completed_request(rq, now);
+ blk_mq_sched_completed_request(rq, now);
blk_account_io_done(rq, now);
--
2.17.1
next reply other threads:[~2020-07-04 7:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-04 7:28 Baolin Wang [this message]
2020-07-10 8:23 ` [PATCH] blk-mq: Remove unnecessary validation before calling blk_mq_sched_completed_request() Baolin Wang
2020-07-10 9:47 ` Ming Lei
2020-07-10 14:00 ` 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=969d0e9f637b2a0dbfb3d284abfbed6fc7665ea4.1593846855.git.baolin.wang7@gmail.com \
--to=baolin.wang@linux.alibaba.com \
--cc=axboe@kernel.dk \
--cc=baolin.wang7@gmail.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ming.lei@redhat.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;
as well as URLs for NNTP newsgroup(s).