mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/2] f2fs: don't kobject_put in the error case
@ 2025-01-31 22:24 Jaegeuk Kim
  2025-01-31 22:24 ` [PATCH 2/2] f2fs: introduce f2fs_base_attr for global sysfs entries Jaegeuk Kim
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Jaegeuk Kim @ 2025-01-31 22:24 UTC (permalink / raw)
  To: linux-kernel, linux-f2fs-devel; +Cc: Jaegeuk Kim

Fix a wrong kobject_put in the error path.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
 fs/f2fs/sysfs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c
index d15c68b28952..001e97cd0a96 100644
--- a/fs/f2fs/sysfs.c
+++ b/fs/f2fs/sysfs.c
@@ -1605,7 +1605,7 @@ int __init f2fs_init_sysfs(void)
 	ret = kobject_init_and_add(&f2fs_feat, &f2fs_feat_ktype,
 				   NULL, "features");
 	if (ret)
-		goto put_kobject;
+		goto unregister_out;
 
 	f2fs_proc_root = proc_mkdir("fs/f2fs", NULL);
 	if (!f2fs_proc_root) {
@@ -1616,6 +1616,7 @@ int __init f2fs_init_sysfs(void)
 	return 0;
 put_kobject:
 	kobject_put(&f2fs_feat);
+unregister_out:
 	kset_unregister(&f2fs_kset);
 	return ret;
 }
-- 
2.48.1.362.g079036d154-goog


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

end of thread, other threads:[~2025-02-06 18:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-31 22:24 [PATCH 1/2] f2fs: don't kobject_put in the error case Jaegeuk Kim
2025-01-31 22:24 ` [PATCH 2/2] f2fs: introduce f2fs_base_attr for global sysfs entries Jaegeuk Kim
2025-02-06  2:11   ` [f2fs-dev] " Chao Yu
2025-02-02 14:58 ` [PATCH 1/2] f2fs: don't kobject_put in the error case Markus Elfring
2025-02-03 18:32 ` Jaegeuk Kim
2025-02-06 18:40 ` [f2fs-dev] " patchwork-bot+f2fs

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®