From e9f2f3f590289681c71d0137d4e5e88421f934c6 Mon Sep 17 00:00:00 2001 From: Chengming Zhou Date: Thu, 6 Apr 2023 22:50:48 +0800 Subject: block, bfq: remove BFQ_WEIGHT_LEGACY_DFL BFQ_WEIGHT_LEGACY_DFL is the same as CGROUP_WEIGHT_DFL, which means we don't need cpd_bind_fn() callback to update default weight when attached to a hierarchy. This patch remove BFQ_WEIGHT_LEGACY_DFL and cpd_bind_fn(). Signed-off-by: Chengming Zhou Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20230406145050.49914-2-zhouchengming@bytedance.com Signed-off-by: Jens Axboe --- block/bfq-cgroup.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'block/bfq-cgroup.c') diff --git a/block/bfq-cgroup.c b/block/bfq-cgroup.c index 89ffb3aa992c..a2ab5dd58068 100644 --- a/block/bfq-cgroup.c +++ b/block/bfq-cgroup.c @@ -504,8 +504,7 @@ static void bfq_cpd_init(struct blkcg_policy_data *cpd) { struct bfq_group_data *d = cpd_to_bfqgd(cpd); - d->weight = cgroup_subsys_on_dfl(io_cgrp_subsys) ? - CGROUP_WEIGHT_DFL : BFQ_WEIGHT_LEGACY_DFL; + d->weight = CGROUP_WEIGHT_DFL; } static void bfq_cpd_free(struct blkcg_policy_data *cpd) @@ -1302,7 +1301,6 @@ struct blkcg_policy blkcg_policy_bfq = { .cpd_alloc_fn = bfq_cpd_alloc, .cpd_init_fn = bfq_cpd_init, - .cpd_bind_fn = bfq_cpd_init, .cpd_free_fn = bfq_cpd_free, .pd_alloc_fn = bfq_pd_alloc, -- cgit