Skip to content

Commit

Permalink
blk-mq: remove redundant validation in __blk_mq_end_request()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Baolin Wang authored and Jens Axboe committed Jul 10, 2020
1 parent 106e71c commit 8789009
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions block/blk-mq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 8789009

Please sign in to comment.