diff options
author | Jens Axboe <axboe@kernel.dk> | 2021-10-16 16:38:14 -0600 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-10-19 05:55:41 -0600 |
commit | e028f167eca5fc56938e6c1680d40eed0bc39e80 (patch) | |
tree | 8b8d8043d38dd9faa0be7b32f0a3809ab24a2d01 /block/blk-mq.c | |
parent | df87eb0fce8fc891b43199447b9aeb3ea2d39bcf (diff) |
block: move blk_mq_tag_to_rq() inline
This is in the fast path of driver issue or completion, and it's a single
array index operation. Move it inline to avoid a function call for it.
This does mean making struct blk_mq_tags block layer public, but there's
not really much in there.
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-mq.c')
-rw-r--r-- | block/blk-mq.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c index 104019c0ea41..8f5c1662335b 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -1120,17 +1120,6 @@ void blk_mq_delay_kick_requeue_list(struct request_queue *q, } EXPORT_SYMBOL(blk_mq_delay_kick_requeue_list); -struct request *blk_mq_tag_to_rq(struct blk_mq_tags *tags, unsigned int tag) -{ - if (tag < tags->nr_tags) { - prefetch(tags->rqs[tag]); - return tags->rqs[tag]; - } - - return NULL; -} -EXPORT_SYMBOL(blk_mq_tag_to_rq); - static bool blk_mq_rq_inflight(struct blk_mq_hw_ctx *hctx, struct request *rq, void *priv, bool reserved) { |