From: Jan Kara <jack@suse.cz>
To: Ted Tso <tytso@mit.edu>
Cc: linux-ext4@vger.kernel.org, Jan Kara <jack@suse.cz>
Subject: [PATCH 2/2] ext4: Enable quotas before orphan cleanup
Date: Tue, 26 Feb 2013 00:36:09 +0100 [thread overview]
Message-ID: <1361835369-19850-2-git-send-email-jack@suse.cz> (raw)
In-Reply-To: <1361835369-19850-1-git-send-email-jack@suse.cz>
When using quota feature we need to enable quotas before orphan cleanup
so that changes happening during it are properly reflected in quota
accounting.
Signed-off-by: Jan Kara <jack@suse.cz>
---
fs/ext4/super.c | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
This is based on Jeff Mahoney's patch to tear down kobj when quota init fails:
ext4: cleanup sbi->s_kobj after quota initialization failure
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 1746a6e..ef1c69e 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -4001,6 +4001,16 @@ no_journal:
if (err)
goto failed_mount7;
+#ifdef CONFIG_QUOTA
+ /* Enable quota usage during mount. */
+ if (EXT4_HAS_RO_COMPAT_FEATURE(sb, EXT4_FEATURE_RO_COMPAT_QUOTA) &&
+ !(sb->s_flags & MS_RDONLY)) {
+ err = ext4_enable_quotas(sb);
+ if (err)
+ goto failed_mount8;
+ }
+#endif /* CONFIG_QUOTA */
+
EXT4_SB(sb)->s_mount_state |= EXT4_ORPHAN_FS;
ext4_orphan_cleanup(sb, es);
EXT4_SB(sb)->s_mount_state &= ~EXT4_ORPHAN_FS;
@@ -4018,16 +4028,6 @@ no_journal:
} else
descr = "out journal";
-#ifdef CONFIG_QUOTA
- /* Enable quota usage during mount. */
- if (EXT4_HAS_RO_COMPAT_FEATURE(sb, EXT4_FEATURE_RO_COMPAT_QUOTA) &&
- !(sb->s_flags & MS_RDONLY)) {
- err = ext4_enable_quotas(sb);
- if (err)
- goto failed_mount8;
- }
-#endif /* CONFIG_QUOTA */
next prev parent reply other threads:[~2013-02-25 23:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-25 23:36 [PATCH 1/2] ext4: Don't allow quota mount options when quota feature enabled Jan Kara
2013-02-25 23:36 ` Jan Kara [this message]
2013-03-02 23:04 ` [PATCH 2/2] ext4: Enable quotas before orphan cleanup Theodore Ts'o
2013-02-26 0:39 ` [PATCH 1/2] ext4: Don't allow quota mount options when quota feature enabled Theodore Ts'o
2013-02-26 13:18 ` Jan Kara
2013-03-02 23:04 ` Theodore Ts'o
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=1361835369-19850-2-git-send-email-jack@suse.cz \
--to=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 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).