summaryrefslogtreecommitdiffstats
path: root/block/blk-mq.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2021-11-13 19:18:32 +0100
committerJens Axboe <axboe@kernel.dk>2021-11-29 14:38:44 +0100
commit5a9d041ba2f6da468c891ca0fe263758e2c12091 (patch)
treeb3d5bcc519faf89478dfd375f9f1590f1e759216 /block/blk-mq.c
parentblock: only allocate poll_stats if there's a user of them (diff)
downloadlinux-5a9d041ba2f6da468c891ca0fe263758e2c12091.tar.xz
linux-5a9d041ba2f6da468c891ca0fe263758e2c12091.zip
block: move io_context creation into where it's needed
The only user of the io_context for IO is BFQ, yet we put the checking and logic of it into the normal IO path. Put the creation into blk_mq_sched_assign_ioc(), and have BFQ use that helper. Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to '')
-rw-r--r--block/blk-mq.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 7cd408408a37..d6e7634e5e1f 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -406,9 +406,6 @@ static struct request *blk_mq_rq_ctx_init(struct blk_mq_alloc_data *data,
if (!op_is_flush(data->cmd_flags) &&
e->type->ops.prepare_request) {
- if (e->type->icq_cache)
- blk_mq_sched_assign_ioc(rq);
-
e->type->ops.prepare_request(rq);
rq->rq_flags |= RQF_ELVPRIV;
}