summaryrefslogtreecommitdiffstats
path: root/block/blk-mq.c
diff options
context:
space:
mode:
authorMing Lei <ming.lei@redhat.com>2020-06-29 11:47:59 +0200
committerJens Axboe <axboe@kernel.dk>2020-06-29 17:56:10 +0200
commit36a3df5a4574d5ddf59804fcd0c4e9654c514d9a (patch)
treefad883c9f1e30985b8ee6c913c6aa9ae4cd0d3f3 /block/blk-mq.c
parentblk-cgroup: remove a dead check in blk_throtl_bio (diff)
downloadlinux-36a3df5a4574d5ddf59804fcd0c4e9654c514d9a.tar.xz
linux-36a3df5a4574d5ddf59804fcd0c4e9654c514d9a.zip
blk-mq: put driver tag when this request is completed
It is natural to release driver tag when this request is completed by LLD or device since its purpose is for LLD use. One big benefit is that the released tag can be re-used quicker since bio_endio() may take too long. Meantime we don't need to release driver tag for flush request. Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to '')
-rw-r--r--block/blk-mq.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c
index b8738b3c6d06..d07e55455726 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -674,6 +674,8 @@ bool blk_mq_complete_request_remote(struct request *rq)
{
WRITE_ONCE(rq->state, MQ_RQ_COMPLETE);
+ blk_mq_put_driver_tag(rq);
+
/*
* For a polled request, always complete locallly, it's pointless
* to redirect the completion.