nilfs2: fix memory leak in nilfs_sysfs_delete_snapshot_group
authorNanyong Sun <sunnanyong@huawei.com>
Wed, 8 Sep 2021 03:00:23 +0000 (20:00 -0700)
committerDom Cobley <popcornmix@gmail.com>
Thu, 14 Oct 2021 11:33:04 +0000 (12:33 +0100)
commitf249e66948f5c3e93012032f125ba4f7b66dfe55
tree2c90561259f5a05f204828b5a68cd3f7bb829f9f
parente8a55bb6c862f22444d424854ccba9287d67b9dc
nilfs2: fix memory leak in nilfs_sysfs_delete_snapshot_group

[ Upstream commit 17243e1c3072b8417a5ebfc53065d0a87af7ca77 ]

kobject_put() should be used to cleanup the memory associated with the
kobject instead of kobject_del().  See the section "Kobject removal" of
"Documentation/core-api/kobject.rst".

Link: https://lkml.kernel.org/r/20210629022556.3985106-7-sunnanyong@huawei.com
Link: https://lkml.kernel.org/r/1625651306-10829-7-git-send-email-konishi.ryusuke@gmail.com
Signed-off-by: Nanyong Sun <sunnanyong@huawei.com>
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nilfs2/sysfs.c