mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ubifs: remove unnecessary kobject_del()
@ 2023-04-05 13:07 Yangtao Li
  2023-04-06  3:36 ` Zhihao Cheng
  2023-04-06  9:08 ` Yangtao Li
  0 siblings, 2 replies; 4+ messages in thread
From: Yangtao Li @ 2023-04-05 13:07 UTC (permalink / raw)
  To: Richard Weinberger; +Cc: Yangtao Li, linux-mtd, linux-kernel

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

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

diff --git a/fs/ubifs/sysfs.c b/fs/ubifs/sysfs.c
index 1c958148bb87..1ffdc3c9b340 100644
--- a/fs/ubifs/sysfs.c
+++ b/fs/ubifs/sysfs.c
@@ -130,7 +130,6 @@ int ubifs_sysfs_register(struct ubifs_info *c)
 
 void ubifs_sysfs_unregister(struct ubifs_info *c)
 {
-	kobject_del(&c->kobj);
 	kobject_put(&c->kobj);
 	wait_for_completion(&c->kobj_unregister);
 
-- 
2.35.1


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

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

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-05 13:07 [PATCH] ubifs: remove unnecessary kobject_del() Yangtao Li
2023-04-06  3:36 ` Zhihao Cheng
2023-04-06  9:08 ` Yangtao Li
2023-04-06 12:29   ` Zhihao Cheng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®