summary refs log tree commit diff
path: root/block/blk-throttle.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2022-09-21 20:04:56 +0200
committerJens Axboe <axboe@kernel.dk>2022-09-26 19:17:27 -0600
commite13793bae65919cd3e6a7827f8d30f4dbb8584ee (patch)
tree2c5232b391d5629ee812460f1204a768d9a5ecb2 /block/blk-throttle.c
parent3657647e33dff916a2d2d9df926d9bca3907d34f (diff)
downloadlinux-e13793bae65919cd3e6a7827f8d30f4dbb8584ee.tar.gz
blk-throttle: pass a gendisk to blk_throtl_init and blk_throtl_exit
Pass the gendisk to blk_throtl_init and blk_throtl_exit 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-13-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-throttle.c')
-rw-r--r--block/blk-throttle.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/block/blk-throttle.c b/block/blk-throttle.c
index 78316955e30f..4879aeca7509 100644
--- a/block/blk-throttle.c
+++ b/block/blk-throttle.c
@@ -2351,8 +2351,9 @@ void blk_throtl_bio_endio(struct bio *bio)
 }
 #endif
 
-int blk_throtl_init(struct request_queue *q)
+int blk_throtl_init(struct gendisk *disk)
 {
+	struct request_queue *q = disk->queue;
 	struct throtl_data *td;
 	int ret;
 
@@ -2394,8 +2395,10 @@ int blk_throtl_init(struct request_queue *q)
 	return ret;
 }
 
-void blk_throtl_exit(struct request_queue *q)
+void blk_throtl_exit(struct gendisk *disk)
 {
+	struct request_queue *q = disk->queue;
+
 	BUG_ON(!q->td);
 	del_timer_sync(&q->td->service_queue.pending_timer);
 	throtl_shutdown_wq(q);