summaryrefslogtreecommitdiffstats
path: root/fs/ext4
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2013-03-02 18:22:38 -0500
committerTheodore Ts'o <tytso@mit.edu>2013-03-02 18:22:38 -0500
commit9b2ff35753c0512bc8c6adae9e9c87cbeee86f82 (patch)
tree5d9962637abdf6d9a88d78942971ced5d8c002b7 /fs/ext4
parent262b4662f42787bff24453ddd3e657265b5d0039 (diff)
downloadlinux-9b2ff35753c0512bc8c6adae9e9c87cbeee86f82.tar.gz
linux-9b2ff35753c0512bc8c6adae9e9c87cbeee86f82.tar.bz2
linux-9b2ff35753c0512bc8c6adae9e9c87cbeee86f82.zip
ext4: enable quotas before orphan cleanup
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> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/super.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index b7deba7d6a44..9379b7fbfd92 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -3933,6 +3933,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;
@@ -3950,16 +3960,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 */
-
if (test_opt(sb, DISCARD)) {
struct request_queue *q = bdev_get_queue(sb->s_bdev);
if (!blk_queue_discard(q))