From 605de505349d93945ca557a7e16a1e73108db01a Mon Sep 17 00:00:00 2001 From: Gou Hao Date: Tue, 6 Dec 2022 17:24:40 +0800 Subject: [PATCH] anolis: fs/resctrl: fix can not write "pseudo-locksetup" to mode file ANBZ: #3367 "pseudo-locksetup" can not be written to the mode file even if i set CONFIG_RESCTRL_FS_PSEUDO_LOCK. It should use CONFIG_RESCTRL_FS_PSEUDO_LOCK in the IS_ENABLED macro. Signed-off-by: Gou Hao Link: https://gitee.com/anolis/cloud-kernel/pulls/976 Reviewed-by: Shawn Wang --- fs/resctrl/rdtgroup.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/resctrl/rdtgroup.c b/fs/resctrl/rdtgroup.c index 3ed724729aa7..0c2bec8d7395 100644 --- a/fs/resctrl/rdtgroup.c +++ b/fs/resctrl/rdtgroup.c @@ -1324,7 +1324,7 @@ static ssize_t rdtgroup_mode_write(struct kernfs_open_file *of, goto out; } rdtgrp->mode = RDT_MODE_EXCLUSIVE; - } else if (IS_ENABLED(RESCTRL_FS_PSEUDO_LOCK) && + } else if (IS_ENABLED(CONFIG_RESCTRL_FS_PSEUDO_LOCK) && !strcmp(buf, "pseudo-locksetup")) { ret = rdtgroup_locksetup_enter(rdtgrp); if (ret) @@ -2272,7 +2272,7 @@ static int rdt_get_tree(struct fs_context *fc) rdtgroup_default.mon.mon_data_kn = kn_mondata; } - if (IS_ENABLED(RESCTRL_FS_PSEUDO_LOCK)) { + if (IS_ENABLED(CONFIG_RESCTRL_FS_PSEUDO_LOCK)) { ret = rdt_pseudo_lock_init(); if (ret) goto out_mondata; @@ -2298,7 +2298,7 @@ static int rdt_get_tree(struct fs_context *fc) goto out; out_psl: - if (IS_ENABLED(RESCTRL_FS_PSEUDO_LOCK)) + if (IS_ENABLED(CONFIG_RESCTRL_FS_PSEUDO_LOCK)) rdt_pseudo_lock_release(); out_mondata: if (resctrl_arch_mon_capable()) -- Gitee