public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 02/10] f2fs: convert to kobject_del_and_put()
@ 2023-03-22 16:58 Yangtao Li
  2023-03-22 16:58 ` [PATCH v3 03/10] erofs: " Yangtao Li
                   ` (8 more replies)
  0 siblings, 9 replies; 21+ messages in thread
From: Yangtao Li @ 2023-03-22 16:58 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] 21+ messages in thread

end of thread, other threads:[~2023-03-23  1:08 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-22 16:58 [PATCH v3 02/10] f2fs: convert to kobject_del_and_put() Yangtao Li
2023-03-22 16:58 ` [PATCH v3 03/10] erofs: " Yangtao Li
2023-03-22 19:09   ` Gao Xiang
2023-03-22 23:33   ` Damien Le Moal
2023-03-22 16:58 ` [PATCH v3 04/10] zonefs: " Yangtao Li
2023-03-22 23:33   ` Damien Le Moal
2023-03-22 16:59 ` [PATCH v3 05/10] ubifs: " Yangtao Li
2023-03-22 17:02   ` Richard Weinberger
2023-03-22 23:34   ` Damien Le Moal
2023-03-23  1:08   ` Zhihao Cheng
2023-03-22 16:59 ` [PATCH v3 06/10] btrfs: " Yangtao Li
2023-03-22 23:35   ` Damien Le Moal
2023-03-22 16:59 ` [PATCH v3 07/10] xfs: " Yangtao Li
2023-03-22 23:35   ` Damien Le Moal
2023-03-22 16:59 ` [PATCH v3 08/10] ocfs2: " Yangtao Li
2023-03-22 23:36   ` Damien Le Moal
2023-03-22 16:59 ` [PATCH v3 09/10] nfs: " Yangtao Li
2023-03-22 23:36   ` Damien Le Moal
2023-03-22 16:59 ` [PATCH v3 10/10] nilfs2: " Yangtao Li
2023-03-22 23:36   ` Damien Le Moal
2023-03-22 23:32 ` [PATCH v3 02/10] f2fs: " 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