linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] zonefs: remove unnecessary kobject_del()
@ 2023-04-12  3:19 Yangtao Li
  2023-04-12  8:04 ` Damien Le Moal
  0 siblings, 1 reply; 4+ messages in thread
From: Yangtao Li @ 2023-04-12  3:19 UTC (permalink / raw)
  To: Damien Le Moal, Naohiro Aota, Johannes Thumshirn
  Cc: Yangtao Li, linux-fsdevel, linux-kernel

kobject_put() actually covers kobject removal automatically, which is
single stage removal. So kill kobject_del() directly.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 fs/zonefs/sysfs.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/zonefs/sysfs.c b/fs/zonefs/sysfs.c
index 8ccb65c2b419..a535bdea1097 100644
--- a/fs/zonefs/sysfs.c
+++ b/fs/zonefs/sysfs.c
@@ -113,7 +113,6 @@ void zonefs_sysfs_unregister(struct super_block *sb)
 	if (!sbi || !sbi->s_sysfs_registered)
 		return;
 
-	kobject_del(&sbi->s_kobj);
 	kobject_put(&sbi->s_kobj);
 	wait_for_completion(&sbi->s_kobj_unregister);
 }
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-04-12  8:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-12  3:19 [PATCH] zonefs: remove unnecessary kobject_del() Yangtao Li
2023-04-12  8:04 ` Damien Le Moal
2023-04-12  8:11   ` Greg KH
2023-04-12  8:18     ` Damien Le Moal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).