Skip to content

Commit a88db1e

Browse files
Christoph Hellwigaxboe
authored andcommitted
blk-mq: fold __blk_mq_insert_request into blk_mq_insert_request
There is no good point in keeping the __blk_mq_insert_request around for two function calls and a singler caller. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Link: https://lore.kernel.org/r/20230413064057.707578-8-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 2bd215d commit a88db1e

2 files changed

Lines changed: 2 additions & 14 deletions

File tree

block/blk-mq.c

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2463,17 +2463,6 @@ static inline void __blk_mq_insert_req_list(struct blk_mq_hw_ctx *hctx,
24632463
list_add_tail(&rq->queuelist, &ctx->rq_lists[type]);
24642464
}
24652465

2466-
void __blk_mq_insert_request(struct blk_mq_hw_ctx *hctx, struct request *rq,
2467-
bool at_head)
2468-
{
2469-
struct blk_mq_ctx *ctx = rq->mq_ctx;
2470-
2471-
lockdep_assert_held(&ctx->lock);
2472-
2473-
__blk_mq_insert_req_list(hctx, rq, at_head);
2474-
blk_mq_hctx_mark_pending(hctx, ctx);
2475-
}
2476-
24772466
/**
24782467
* blk_mq_request_bypass_insert - Insert a request at dispatch list.
24792468
* @rq: Pointer to request to be inserted.
@@ -2598,7 +2587,8 @@ static void blk_mq_insert_request(struct request *rq, bool at_head,
25982587
e->type->ops.insert_requests(hctx, &list, at_head);
25992588
} else {
26002589
spin_lock(&ctx->lock);
2601-
__blk_mq_insert_request(hctx, rq, at_head);
2590+
__blk_mq_insert_req_list(hctx, rq, at_head);
2591+
blk_mq_hctx_mark_pending(hctx, ctx);
26022592
spin_unlock(&ctx->lock);
26032593
}
26042594

block/blk-mq.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@ void blk_mq_free_map_and_rqs(struct blk_mq_tag_set *set,
6565
/*
6666
* Internal helpers for request insertion into sw queues
6767
*/
68-
void __blk_mq_insert_request(struct blk_mq_hw_ctx *hctx, struct request *rq,
69-
bool at_head);
7068
void blk_mq_request_bypass_insert(struct request *rq, bool at_head,
7169
bool run_queue);
7270

0 commit comments

Comments
 (0)