diff options
author | Reinette Chatre <reinette.chatre@intel.com> | 2018-06-23 01:42:24 +0300 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2018-06-23 14:03:50 +0300 |
commit | 0af6a48da481109affc4ea8295034f69993a91ef (patch) | |
tree | 4c994a227ad635aa7ede08f31702ef00aaf81cef /arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | |
parent | f4e80d67a527469245f391976d8665f934a16205 (diff) | |
download | linux-0af6a48da481109affc4ea8295034f69993a91ef.tar.xz |
x86/intel_rdt: Ensure RDT cleanup on exit
The RDT system's initialization does not have the corresponding exit
handling to ensure everything initialized on load is cleaned up also.
Introduce the cleanup routines that complement all initialization. This
includes the removal of a duplicate rdtgroup_init() declaration.
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: fenghua.yu@intel.com
Cc: tony.luck@intel.com
Cc: vikas.shivappa@linux.intel.com
Cc: gavin.hindman@intel.com
Cc: jithu.joseph@intel.com
Cc: dave.hansen@intel.com
Cc: hpa@zytor.com
Link: https://lkml.kernel.org/r/a9e3a2bbd731d13915d2d7bf05d4f675b4fa109b.1529706536.git.reinette.chatre@intel.com
Diffstat (limited to 'arch/x86/kernel/cpu/intel_rdt_rdtgroup.c')
-rw-r--r-- | arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c b/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c index f301919ae9b2..960066249374 100644 --- a/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c +++ b/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c @@ -2828,3 +2828,10 @@ cleanup_root: return ret; } + +void __exit rdtgroup_exit(void) +{ + unregister_filesystem(&rdt_fs_type); + sysfs_remove_mount_point(fs_kobj, "resctrl"); + kernfs_destroy_root(rdt_root); +} |