drivers/base/node.c: fix compaction sysfs file leak
authorMiaohe Lin <linmiaohe@huawei.com>
Fri, 1 Apr 2022 07:09:05 +0000 (15:09 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Apr 2022 07:51:57 +0000 (09:51 +0200)
commita72b6dff4089e6c3455e73ea97b08623b4fed699
tree7badc23cf0d6921c581cd33be2fbe2758d5fd502
parent84e7c6786aad1dffa04f5729270f8fcd7281fe4b
drivers/base/node.c: fix compaction sysfs file leak

Compaction sysfs file is created via compaction_register_node in
register_node. But we forgot to remove it in unregister_node. Thus
compaction sysfs file is leaked. Using compaction_unregister_node
to fix this issue.

Fixes: ed4a6d7f0676 ("mm: compaction: add /sys trigger for per-node memory compaction")
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Link: https://lore.kernel.org/r/20220401070905.43679-1-linmiaohe@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/node.c