blk-mq: remove redundant validation in __blk_mq_end_request()
authorBaolin Wang <baolin.wang@linux.alibaba.com>
Sat, 4 Jul 2020 07:28:21 +0000 (15:28 +0800)
committerJens Axboe <axboe@kernel.dk>
Fri, 10 Jul 2020 13:58:33 +0000 (07:58 -0600)
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. Rmove it.

Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq.c

index b6dd080d39625a7bea831cc149af1a664fbc80e5..c3856377b961e62ed877f4fb9168bb1702aea109 100644 (file)
@@ -544,8 +544,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);