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@xxxxxx> --- block/blk-mq.c | 14 ++------------ block/blk-mq.h | 2 -- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index 05be4ae4fc0dba..4f0ecd0561e48f 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -2465,17 +2465,6 @@ static inline void __blk_mq_insert_req_list(struct blk_mq_hw_ctx *hctx, list_add_tail(&rq->queuelist, &ctx->rq_lists[type]); } -void __blk_mq_insert_request(struct blk_mq_hw_ctx *hctx, struct request *rq, - bool at_head) -{ - struct blk_mq_ctx *ctx = rq->mq_ctx; - - lockdep_assert_held(&ctx->lock); - - __blk_mq_insert_req_list(hctx, rq, at_head); - blk_mq_hctx_mark_pending(hctx, ctx); -} - /** * blk_mq_request_bypass_insert - Insert a request at dispatch list. * @rq: Pointer to request to be inserted. @@ -2600,7 +2589,8 @@ static void blk_mq_insert_request(struct request *rq, bool at_head, e->type->ops.insert_requests(hctx, &list, at_head); } else { spin_lock(&ctx->lock); - __blk_mq_insert_request(hctx, rq, at_head); + __blk_mq_insert_req_list(hctx, rq, at_head); + blk_mq_hctx_mark_pending(hctx, ctx); spin_unlock(&ctx->lock); } diff --git a/block/blk-mq.h b/block/blk-mq.h index 192784836f8a83..c2aec5cbfa7663 100644 --- a/block/blk-mq.h +++ b/block/blk-mq.h @@ -59,8 +59,6 @@ void blk_mq_free_map_and_rqs(struct blk_mq_tag_set *set, /* * Internal helpers for request insertion into sw queues */ -void __blk_mq_insert_request(struct blk_mq_hw_ctx *hctx, struct request *rq, - bool at_head); void blk_mq_request_bypass_insert(struct request *rq, bool at_head, bool run_queue); -- 2.39.2