diff options
author | Christoph Hellwig <hch@lst.de> | 2021-11-26 12:58:11 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-11-29 14:41:29 +0100 |
commit | 222ee581b84582dc472d5395b77d7e0cb5268d1c (patch) | |
tree | 3956cbf07c87ab9fc9bd97dd61c93b4e15a55c30 /block/blk-mq.c | |
parent | block: move blk_mq_sched_assign_ioc to blk-ioc.c (diff) | |
download | linux-222ee581b84582dc472d5395b77d7e0cb5268d1c.tar.xz linux-222ee581b84582dc472d5395b77d7e0cb5268d1c.zip |
block: move the remaining elv.icq handling to the I/O scheduler
After the prepare side has been moved to the only I/O scheduler that
cares, do the same for the cleanup and the NULL initialization.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20211126115817.2087431-9-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to '')
-rw-r--r-- | block/blk-mq.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c index 143a8edf6300..3e67662f7801 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -400,7 +400,6 @@ static struct request *blk_mq_rq_ctx_init(struct blk_mq_alloc_data *data, if (rq->rq_flags & RQF_ELV) { struct elevator_queue *e = data->q->elevator; - rq->elv.icq = NULL; INIT_HLIST_NODE(&rq->hash); RB_CLEAR_NODE(&rq->rb_node); @@ -631,16 +630,9 @@ void blk_mq_free_request(struct request *rq) struct request_queue *q = rq->q; struct blk_mq_hw_ctx *hctx = rq->mq_hctx; - if (rq->rq_flags & RQF_ELVPRIV) { - struct elevator_queue *e = q->elevator; - - if (e->type->ops.finish_request) - e->type->ops.finish_request(rq); - if (rq->elv.icq) { - put_io_context(rq->elv.icq->ioc); - rq->elv.icq = NULL; - } - } + if ((rq->rq_flags & RQF_ELVPRIV) && + q->elevator->type->ops.finish_request) + q->elevator->type->ops.finish_request(rq); if (rq->rq_flags & RQF_MQ_INFLIGHT) __blk_mq_dec_active_requests(hctx); |