summaryrefslogtreecommitdiff
path: root/block/bfq-iosched.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2021-11-26 12:58:07 +0100
committerJens Axboe <axboe@kernel.dk>2021-11-29 06:41:29 -0700
commita0725c22cd8487f107a80ef87abf03c6379ec927 (patch)
tree2aa49366d5247d44b7ff87b80cec9995bf19296e /block/bfq-iosched.c
parent836b394b633e3d618fa44292290bf3d9a1761e0c (diff)
bfq: use bfq_bic_lookup in bfq_limit_depth
No need to create a new I/O context if there is none present yet in ->limit_depth. Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20211126115817.2087431-5-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/bfq-iosched.c')
-rw-r--r--block/bfq-iosched.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
index c990c6409c11..ecc2e57e6863 100644
--- a/block/bfq-iosched.c
+++ b/block/bfq-iosched.c
@@ -663,7 +663,7 @@ static bool bfqq_request_over_limit(struct bfq_queue *bfqq, int limit)
static void bfq_limit_depth(unsigned int op, struct blk_mq_alloc_data *data)
{
struct bfq_data *bfqd = data->q->elevator->elevator_data;
- struct bfq_io_cq *bic = icq_to_bic(blk_mq_sched_get_icq(data->q));
+ struct bfq_io_cq *bic = bfq_bic_lookup(data->q);
struct bfq_queue *bfqq = bic ? bic_to_bfqq(bic, op_is_sync(op)) : NULL;
int depth;
unsigned limit = data->q->nr_requests;