Skip to contentSkip to conversation

nilfs2-fix-memory-leak-in-nilfs_sysfs_delete_snapshot_group.patch removed from -mm tree

merged [email protected] 1 participant 1 message Sep 9, 2021

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: nilfs2: fix memory leak in nilfs_sysfs_delete_snapshot_group
has been removed from the -mm tree. Its filename was
nilfs2-fix-memory-leak-in-nilfs_sysfs_delete_snapshot_group.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Nanyong Sun <[email protected]>
Subject: nilfs2: fix memory leak in nilfs_sysfs_delete_snapshot_group

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".

---

 fs/nilfs2/sysfs.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/nilfs2/sysfs.c renamed from fs/nilfs2/sysfs.c~nilfs2-fix-memory-leak-in-nilfs_sysfs_delete_snapshot_group +1 -1
@@ -202,7 +202,7 @@ int nilfs_sysfs_create_snapshot_group(st
 
 void nilfs_sysfs_delete_snapshot_group(struct nilfs_root *root)
 {
-	kobject_del(&root->snapshot_kobj);
+	kobject_put(&root->snapshot_kobj);
 }
 
 /************************************************************************

_

Patches currently in -mm which might be from [email protected] are