summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2022-09-21 20:04:59 +0200
committerJens Axboe <axboe@kernel.dk>2022-09-26 19:17:28 -0600
commit00ad6991bbae116b7c83f68754edd6f4d5e65e01 (patch)
tree372d5b526fe6867e49dd13bf4340a0a98ba96b1d
parentcad9266abcef586aa95f6f4095781e3e55473f2a (diff)
downloadlinux-riscv-00ad6991bbae116b7c83f68754edd6f4d5e65e01.tar.gz
linux-riscv-00ad6991bbae116b7c83f68754edd6f4d5e65e01.tar.bz2
linux-riscv-00ad6991bbae116b7c83f68754edd6f4d5e65e01.zip
blk-cgroup: pass a gendisk to blkg_destroy_all
Pass the gendisk to blkg_destroy_all as part of moving the blk-cgroup infrastructure to be gendisk based. 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/20220921180501.1539876-16-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--block/blk-cgroup.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
index 3dfd78f1312d..c2d5ca2eb92e 100644
--- a/block/blk-cgroup.c
+++ b/block/blk-cgroup.c
@@ -462,14 +462,9 @@ static void blkg_destroy(struct blkcg_gq *blkg)
percpu_ref_kill(&blkg->refcnt);
}
-/**
- * blkg_destroy_all - destroy all blkgs associated with a request_queue
- * @q: request_queue of interest
- *
- * Destroy all blkgs associated with @q.
- */
-static void blkg_destroy_all(struct request_queue *q)
+static void blkg_destroy_all(struct gendisk *disk)
{
+ struct request_queue *q = disk->queue;
struct blkcg_gq *blkg, *n;
int count = BLKG_DESTROY_BATCH_SIZE;
@@ -1276,7 +1271,7 @@ err_throtl_exit:
err_ioprio_exit:
blk_ioprio_exit(disk);
err_destroy_all:
- blkg_destroy_all(q);
+ blkg_destroy_all(disk);
return ret;
err_unlock:
spin_unlock_irq(&q->queue_lock);
@@ -1287,7 +1282,7 @@ err_unlock:
void blkcg_exit_disk(struct gendisk *disk)
{
- blkg_destroy_all(disk->queue);
+ blkg_destroy_all(disk);
blk_throtl_exit(disk);
}