linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RESEND,PATCH v2 02/10] f2fs: convert to kobject_del_and_put()
@ 2023-03-20 18:47 Yangtao Li
  2023-03-20 18:47 ` [RESEND,PATCH v2 03/10] erofs: " Yangtao Li
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Yangtao Li @ 2023-03-20 18:47 UTC (permalink / raw)
  To: Jaegeuk Kim, Chao Yu
  Cc: Yangtao Li, Greg Kroah-Hartman, Rafael J. Wysocki,
	Damien Le Moal, linux-f2fs-devel, linux-kernel

Use kobject_del_and_put() to simplify code.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 fs/f2fs/sysfs.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c
index 9ddc6ee19433..b455afc12cfc 100644
--- a/fs/f2fs/sysfs.c
+++ b/fs/f2fs/sysfs.c
@@ -1478,14 +1478,11 @@ void f2fs_unregister_sysfs(struct f2fs_sb_info *sbi)
 		remove_proc_entry(sbi->sb->s_id, f2fs_proc_root);
 	}
 
-	kobject_del(&sbi->s_stat_kobj);
-	kobject_put(&sbi->s_stat_kobj);
+	kobject_del_and_put(&sbi->s_stat_kobj);
 	wait_for_completion(&sbi->s_stat_kobj_unregister);
-	kobject_del(&sbi->s_feature_list_kobj);
-	kobject_put(&sbi->s_feature_list_kobj);
+	kobject_del_and_put(&sbi->s_feature_list_kobj);
 	wait_for_completion(&sbi->s_feature_list_kobj_unregister);
 
-	kobject_del(&sbi->s_kobj);
-	kobject_put(&sbi->s_kobj);
+	kobject_del_and_put(&sbi->s_kobj);
 	wait_for_completion(&sbi->s_kobj_unregister);
 }
-- 
2.35.1


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

end of thread, other threads:[~2023-03-20 18:58 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-20 18:47 [RESEND,PATCH v2 02/10] f2fs: convert to kobject_del_and_put() Yangtao Li
2023-03-20 18:47 ` [RESEND,PATCH v2 03/10] erofs: " Yangtao Li
2023-03-20 18:47 ` [RESEND,PATCH v2 04/10] zonefs: " Yangtao Li
2023-03-20 18:47 ` [RESEND,PATCH v2 05/10] ubifs: " Yangtao Li
2023-03-20 18:47 ` [RESEND,PATCH v2 06/10] btrfs: " Yangtao Li
2023-03-20 18:47 ` [RESEND,PATCH v2 07/10] xfs: " Yangtao Li
2023-03-20 18:47 ` [RESEND,PATCH v2 08/10] ocfs2: " Yangtao Li
2023-03-20 18:47 ` [RESEND,PATCH v2 09/10] nfs: " Yangtao Li
2023-03-20 18:47 ` [RESEND,PATCH v2 10/10] nilfs2: " Yangtao Li

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