summaryrefslogtreecommitdiff
path: root/block/blk-cgroup.c
diff options
context:
space:
mode:
authorYu Kuai <yukuai3@huawei.com>2024-07-19 15:15:06 +0800
committerJens Axboe <axboe@kernel.dk>2024-07-28 16:47:51 -0600
commit79c6c60a6c1f5128b31ab80b7ac1c4d8255342ac (patch)
treeb8bef8b9ffeb07d84bfe0f8b8e7c36f9aa2556f5 /block/blk-cgroup.c
parentd0e92795997c8dce7ec804791e359a93211f9719 (diff)
downloadlwn-79c6c60a6c1f5128b31ab80b7ac1c4d8255342ac.tar.gz
lwn-79c6c60a6c1f5128b31ab80b7ac1c4d8255342ac.zip
blk-ioprio: remove per-disk structure
ioprio works on the blk-cgroup level, all disks in the same cgroup are the same, and the struct ioprio_blkg doesn't have anything in it. Hence register the policy is enough, because cpd_alloc/free_fn will be handled for each blk-cgroup, and there is no need to activate the policy for disk. Hence remove blk_ioprio_init/exit and ioprio_alloc/free_pd. Signed-off-by: Yu Kuai <yukuai3@huawei.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Acked-by: Tejun Heo <tj@kernel.org> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Link: https://lore.kernel.org/r/20240719071506.158075-4-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-cgroup.c')
-rw-r--r--block/blk-cgroup.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
index fa6ec02ab3cf..e68c725cf8d9 100644
--- a/block/blk-cgroup.c
+++ b/block/blk-cgroup.c
@@ -1458,7 +1458,6 @@ int blkcg_init_disk(struct gendisk *disk)
struct request_queue *q = disk->queue;
struct blkcg_gq *new_blkg, *blkg;
bool preloaded;
- int ret;
new_blkg = blkg_alloc(&blkcg_root, disk, GFP_KERNEL);
if (!new_blkg)
@@ -1478,15 +1477,8 @@ int blkcg_init_disk(struct gendisk *disk)
if (preloaded)
radix_tree_preload_end();
- ret = blk_ioprio_init(disk);
- if (ret)
- goto err_destroy_all;
-
return 0;
-err_destroy_all:
- blkg_destroy_all(disk);
- return ret;
err_unlock:
spin_unlock_irq(&q->queue_lock);
if (preloaded)