linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] blk-mq: Remove unnecessary validation before calling blk_mq_sched_completed_request()
@ 2020-07-04  7:28 Baolin Wang
  2020-07-10  8:23 ` Baolin Wang
  2020-07-10 14:00 ` Jens Axboe
  0 siblings, 2 replies; 4+ messages in thread
From: Baolin Wang @ 2020-07-04  7:28 UTC (permalink / raw)
  To: axboe; +Cc: ming.lei, baolin.wang, baolin.wang7, linux-block, linux-kernel

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-07-10 14:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-04  7:28 [PATCH] blk-mq: Remove unnecessary validation before calling blk_mq_sched_completed_request() Baolin Wang
2020-07-10  8:23 ` Baolin Wang
2020-07-10  9:47   ` Ming Lei
2020-07-10 14:00 ` Jens Axboe

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).