diff options
author | Ming Lei <ming.lei@redhat.com> | 2020-06-30 22:03:56 +0800 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-06-30 12:57:59 -0600 |
commit | 723bf178f158abd1ce6069cb049581b3cb003aab (patch) | |
tree | 0e940d0407c738fedc99a0fb49fdd522bb8039fd /block/blk-mq.h | |
parent | 570e9b73b0af2e5381ca5343759779b8c1ed20e3 (diff) | |
download | lwn-723bf178f158abd1ce6069cb049581b3cb003aab.tar.gz lwn-723bf178f158abd1ce6069cb049581b3cb003aab.zip |
blk-mq: move blk_mq_put_driver_tag() into blk-mq.c
It is used by blk-mq.c only, so move it to the source file.
Suggested-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Cc: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-mq.h')
-rw-r--r-- | block/blk-mq.h | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/block/blk-mq.h b/block/blk-mq.h index 863a2f3346d4..3661e821d460 100644 --- a/block/blk-mq.h +++ b/block/blk-mq.h @@ -193,26 +193,6 @@ static inline bool blk_mq_get_dispatch_budget(struct request_queue *q) return true; } -static inline void __blk_mq_put_driver_tag(struct blk_mq_hw_ctx *hctx, - struct request *rq) -{ - blk_mq_put_tag(hctx->tags, rq->mq_ctx, rq->tag); - rq->tag = BLK_MQ_NO_TAG; - - if (rq->rq_flags & RQF_MQ_INFLIGHT) { - rq->rq_flags &= ~RQF_MQ_INFLIGHT; - atomic_dec(&hctx->nr_active); - } -} - -static inline void blk_mq_put_driver_tag(struct request *rq) -{ - if (rq->tag == BLK_MQ_NO_TAG || rq->internal_tag == BLK_MQ_NO_TAG) - return; - - __blk_mq_put_driver_tag(rq->mq_hctx, rq); -} - static inline void blk_mq_clear_mq_map(struct blk_mq_queue_map *qmap) { int cpu; |