summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorBaolin Wang <baolin.wang@linux.alibaba.com>2020-07-04 10:28:21 +0300
committerJens Axboe <axboe@kernel.dk>2020-07-10 16:58:33 +0300
commit87890092ee6504a49841d854ff81a71a85c19a5d (patch)
treeea885a16ae908c24fb98545d75936193ea29716a /block
parent106e71c51287b9bdf9d400cac657a9af7f0f1e3d (diff)
downloadlinux-87890092ee6504a49841d854ff81a71a85c19a5d.tar.xz
blk-mq: remove redundant validation in __blk_mq_end_request()
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>
Diffstat (limited to 'block')
-rw-r--r--block/blk-mq.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c
index b6dd080d3962..c3856377b961 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -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);