hulk inclusion category: bugfix bugzilla: https://atomgit.com/openeuler/kernel/issues/9840 ------------------ Remove the mbm_core field and its associated allocation from struct rdt_domain, as it is no referenced anywhere in the codebase. This is a code cleanup with no functional change. Fixes: 556688623b2b ("fs/resctrl: Create l2 cache monitors") Signed-off-by: Zeng Heng <zengheng4@huawei.com> --- fs/resctrl/rdtgroup.c | 10 ---------- include/linux/resctrl.h | 1 - 2 files changed, 11 deletions(-) diff --git a/fs/resctrl/rdtgroup.c b/fs/resctrl/rdtgroup.c index b719eded4839b..601c74e18315b 100644 --- a/fs/resctrl/rdtgroup.c +++ b/fs/resctrl/rdtgroup.c @@ -4119,16 +4119,6 @@ static int domain_setup_mon_state(struct rdt_resource *r, struct rdt_domain *d) return -ENOMEM; } } - if (resctrl_arch_is_mbm_core_enabled()) { - tsize = sizeof(*d->mbm_core); - d->mbm_core = kcalloc(idx_limit, tsize, GFP_KERNEL); - if (!d->mbm_core) { - bitmap_free(d->rmid_busy_llc); - kfree(d->mbm_total); - kfree(d->mbm_local); - return -ENOMEM; - } - } return 0; } diff --git a/include/linux/resctrl.h b/include/linux/resctrl.h index 6fb5e7ca29a26..a9ef4cfce2a62 100644 --- a/include/linux/resctrl.h +++ b/include/linux/resctrl.h @@ -119,7 +119,6 @@ struct rdt_domain { unsigned long *rmid_busy_llc; struct mbm_state *mbm_total; struct mbm_state *mbm_local; - struct mbm_state *mbm_core; struct delayed_work mbm_over; struct delayed_work cqm_limbo; int mbm_work_cpu; -- 2.43.0