summaryrefslogtreecommitdiff
path: root/block/blk-iocost.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2023-02-03 16:03:47 +0100
committerJens Axboe <axboe@kernel.dk>2023-02-03 08:20:05 -0700
commit84d7d462b16dd5f0bf7c7ca9254bf81db2c952a2 (patch)
tree338edb3db9c6078f07403110e27b65c471818750 /block/blk-iocost.c
parent180b04d450a7137270c12dbb6bebf1d5e6c0a6f2 (diff)
blk-cgroup: pin the gendisk in struct blkcg_gq
Currently each blkcg_gq holds a request_queue reference, which is what is used in the policies. But a lot of these interfaces will move over to use a gendisk, so store a disk in struct blkcg_gq and hold a reference to it. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Andreas Herrmann <aherrmann@suse.de> Acked-by: Tejun Heo <tj@kernel.org> Link: https://lore.kernel.org/r/20230203150400.3199230-7-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-iocost.c')
-rw-r--r--block/blk-iocost.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-iocost.c b/block/blk-iocost.c
index 9694394ed883..a2b4e7146be5 100644
--- a/block/blk-iocost.c
+++ b/block/blk-iocost.c
@@ -2953,7 +2953,7 @@ static void ioc_pd_init(struct blkg_policy_data *pd)
{
struct ioc_gq *iocg = pd_to_iocg(pd);
struct blkcg_gq *blkg = pd_to_blkg(&iocg->pd);
- struct ioc *ioc = q_to_ioc(blkg->q);
+ struct ioc *ioc = q_to_ioc(blkg->disk->queue);
struct ioc_now now;
struct blkcg_gq *tblkg;
unsigned long flags;