From: Jeff Mahoney <jeffm@suse.com>
To: Jan Kara <jack@suse.cz>, Aditya Kali <adityakali@google.com>,
Theodore Ts'o <tytso@mit.edu>
Cc: linux-ext4@vger.kernel.org
Subject: [PATCH] ext4: cleanup sbi->s_kobj after quota initialization failure
Date: Mon, 25 Feb 2013 15:55:23 -0500 [thread overview]
Message-ID: <512BCFBB.30208@suse.com> (raw)
If ext4_enable_quotas fails, it jumps to failed_mount7, which doesn't
tear down the kobj.
Cc: Aditya Kali <adityakali@google.com>
Cc: Jan Kara <jack@suse.cz>
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
---
fs/ext4/super.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -3794,7 +3794,7 @@ no_journal:
!(sb->s_flags & MS_RDONLY)) {
err = ext4_enable_quotas(sb);
if (err)
- goto failed_mount7;
+ goto failed_mount8;
}
#endif /* CONFIG_QUOTA */
@@ -3813,6 +3813,10 @@ cantfind_ext4:
ext4_msg(sb, KERN_ERR, "VFS: Can't find ext4 filesystem");
goto failed_mount;
+failed_mount8:
+ kobject_del(&sbi->s_kobj);
+ kobject_put(&sbi->s_kobj);
+ wait_for_completion(&sbi->s_kobj_unregister);
failed_mount7:
ext4_unregister_li_request(sb);
failed_mount6:
--
Jeff Mahoney
SUSE Labs
next reply other threads:[~2013-02-25 20:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-25 20:55 Jeff Mahoney [this message]
2013-02-25 23:32 ` [PATCH] ext4: cleanup sbi->s_kobj after quota initialization failure Jan Kara
2013-02-26 1:14 ` Aditya Kali
2013-02-26 2:53 ` Jeff Mahoney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=512BCFBB.30208@suse.com \
--to=jeffm@suse.com \
--cc=adityakali@google.com \
--cc=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.