x86/resctrl: Unwind properly from rdt_enable_ctx()
mainline inclusion from mainline-v6.7-rc1 commit df5f3a1dd8a6d3ddb1f07a10817f735194717422 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I8T2RT Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=df5f3a1dd8a6d3ddb1f07a10817f735194717422 -------------------------------- rdt_enable_ctx() enables the features provided during resctrl mount. Additions to rdt_enable_ctx() are required to also modify error paths of rdt_enable_ctx() callers to ensure correct unwinding if errors are encountered after calling rdt_enable_ctx(). This is error prone. Introduce rdt_disable_ctx() to refactor the error unwinding of rdt_enable_ctx() to simplify future additions. This also simplifies cleanup in rdt_kill_sb(). Suggested-by:Reinette Chatre <reinette.chatre@intel.com> Signed-off-by:
Babu Moger <babu.moger@amd.com> Signed-off-by:
Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by:
Peter Newman <peternewman@google.com> Reviewed-by:
Tan Shaopeng <tan.shaopeng@jp.fujitsu.com> Reviewed-by:
Fenghua Yu <fenghua.yu@intel.com> Reviewed-by:
Reinette Chatre <reinette.chatre@intel.com> Reviewed-by:
Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Tested-by:
Peter Newman <peternewman@google.com> Tested-by:
Tan Shaopeng <tan.shaopeng@jp.fujitsu.com> Link: https://lore.kernel.org/r/20231017002308.134480-5-babu.moger@amd.com Signed-off-by:
Zeng Heng <zengheng4@huawei.com>
Loading
Please sign in to comment