Skip to content

Commit b199ac6

Browse files
suryasaimadhuingomolnar
authored andcommitted
x86/RAS/mce_amd_inj: Remove debugfs dir recursively on exit
Simplify exit_mce_inject() by using debugfs_remove_recursive() and do away with the noodling over the dentry elements. Signed-off-by: Borislav Petkov <bp@suse.de> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/20160926083152.30848-3-bp@alien8.de Signed-off-by: Ingo Molnar <mingo@kernel.org>
1 parent 8b44f00 commit b199ac6

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

‎arch/x86/ras/mce_amd_inj.c‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -475,15 +475,11 @@ static int __init init_mce_inject(void)
475475

476476
static void __exit exit_mce_inject(void)
477477
{
478-
int i;
479478

480-
for (i = 0; i < ARRAY_SIZE(dfs_fls); i++)
481-
debugfs_remove(dfs_fls[i].d);
479+
debugfs_remove_recursive(dfs_inj);
480+
dfs_inj = NULL;
482481

483482
memset(&dfs_fls, 0, sizeof(dfs_fls));
484-
485-
debugfs_remove(dfs_inj);
486-
dfs_inj = NULL;
487483
}
488484
module_init(init_mce_inject);
489485
module_exit(exit_mce_inject);

0 commit comments

Comments
 (0)