diff options
author | Jan Kara <jack@suse.cz> | 2013-03-02 18:22:38 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2013-03-02 18:22:38 -0500 |
commit | 9b2ff35753c0512bc8c6adae9e9c87cbeee86f82 (patch) | |
tree | 5d9962637abdf6d9a88d78942971ced5d8c002b7 /fs | |
parent | 262b4662f42787bff24453ddd3e657265b5d0039 (diff) |
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')
-rw-r--r-- | fs/ext4/super.c | 20 |
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: | |||
3933 | if (err) | 3933 | if (err) |
3934 | goto failed_mount7; | 3934 | goto failed_mount7; |
3935 | 3935 | ||
3936 | #ifdef CONFIG_QUOTA | ||
3937 | /* Enable quota usage during mount. */ | ||
3938 | if (EXT4_HAS_RO_COMPAT_FEATURE(sb, EXT4_FEATURE_RO_COMPAT_QUOTA) && | ||
3939 | !(sb->s_flags & MS_RDONLY)) { | ||
3940 | err = ext4_enable_quotas(sb); | ||
3941 | if (err) | ||
3942 | goto failed_mount8; | ||
3943 | } | ||
3944 | #endif /* CONFIG_QUOTA */ | ||
3945 | |||
3936 | EXT4_SB(sb)->s_mount_state |= EXT4_ORPHAN_FS; | 3946 | EXT4_SB(sb)->s_mount_state |= EXT4_ORPHAN_FS; |
3937 | ext4_orphan_cleanup(sb, es); | 3947 | ext4_orphan_cleanup(sb, es); |
3938 | EXT4_SB(sb)->s_mount_state &= ~EXT4_ORPHAN_FS; | 3948 | EXT4_SB(sb)->s_mount_state &= ~EXT4_ORPHAN_FS; |
@@ -3950,16 +3960,6 @@ no_journal: | |||
3950 | } else | 3960 | } else |
3951 | descr = "out journal"; | 3961 | descr = "out journal"; |
3952 | 3962 | ||
3953 | #ifdef CONFIG_QUOTA | ||
3954 | /* Enable quota usage during mount. */ | ||
3955 | if (EXT4_HAS_RO_COMPAT_FEATURE(sb, EXT4_FEATURE_RO_COMPAT_QUOTA) && | ||
3956 | !(sb->s_flags & MS_RDONLY)) { | ||
3957 | err = ext4_enable_quotas(sb); | ||
3958 | if (err) | ||
3959 | goto failed_mount8; | ||
3960 | } | ||
3961 | #endif /* CONFIG_QUOTA */ | ||
3962 | |||
3963 | if (test_opt(sb, DISCARD)) { | 3963 | if (test_opt(sb, DISCARD)) { |
3964 | struct request_queue *q = bdev_get_queue(sb->s_bdev); | 3964 | struct request_queue *q = bdev_get_queue(sb->s_bdev); |
3965 | if (!blk_queue_discard(q)) | 3965 | if (!blk_queue_discard(q)) |