diff options
author | Christoph Hellwig <hch@lst.de> | 2023-02-14 19:33:08 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2023-02-14 22:24:09 +0100 |
commit | a06377c5d01eeeaa52ad979b62c3c72efcc3eff0 (patch) | |
tree | 135bc4e5b3bb9012dc139ba36650893f08872c84 /block/blk-cgroup.h | |
parent | Revert "blk-cgroup: pass a gendisk to blkg_lookup" (diff) | |
download | linux-a06377c5d01eeeaa52ad979b62c3c72efcc3eff0.tar.xz linux-a06377c5d01eeeaa52ad979b62c3c72efcc3eff0.zip |
Revert "blk-cgroup: pin the gendisk in struct blkcg_gq"
This reverts commit 84d7d462b16dd5f0bf7c7ca9254bf81db2c952a2.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20230214183308.1658775-6-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-cgroup.h')
-rw-r--r-- | block/blk-cgroup.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/block/blk-cgroup.h b/block/blk-cgroup.h index 3d9e42c519db..9c5078755e5e 100644 --- a/block/blk-cgroup.h +++ b/block/blk-cgroup.h @@ -53,7 +53,8 @@ struct blkg_iostat_set { /* association between a blk cgroup and a request queue */ struct blkcg_gq { - struct gendisk *disk; + /* Pointer to the associated request_queue */ + struct request_queue *q; struct list_head q_node; struct hlist_node blkcg_node; struct blkcg *blkcg; @@ -253,11 +254,11 @@ static inline struct blkcg_gq *blkg_lookup(struct blkcg *blkcg, return q->root_blkg; blkg = rcu_dereference(blkcg->blkg_hint); - if (blkg && blkg->disk->queue == q) + if (blkg && blkg->q == q) return blkg; blkg = radix_tree_lookup(&blkcg->blkg_tree, q->id); - if (blkg && blkg->disk->queue != q) + if (blkg && blkg->q != q) blkg = NULL; return blkg; } @@ -357,7 +358,7 @@ static inline void blkg_put(struct blkcg_gq *blkg) #define blkg_for_each_descendant_pre(d_blkg, pos_css, p_blkg) \ css_for_each_descendant_pre((pos_css), &(p_blkg)->blkcg->css) \ if (((d_blkg) = blkg_lookup(css_to_blkcg(pos_css), \ - (p_blkg)->disk->queue))) + (p_blkg)->q))) /** * blkg_for_each_descendant_post - post-order walk of a blkg's descendants @@ -372,7 +373,7 @@ static inline void blkg_put(struct blkcg_gq *blkg) #define blkg_for_each_descendant_post(d_blkg, pos_css, p_blkg) \ css_for_each_descendant_post((pos_css), &(p_blkg)->blkcg->css) \ if (((d_blkg) = blkg_lookup(css_to_blkcg(pos_css), \ - (p_blkg)->disk->queue))) + (p_blkg)->q))) bool __blkcg_punt_bio_submit(struct bio *bio); |