aboutsummaryrefslogtreecommitdiff
path: root/fs/ext4/super.c
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2017-10-04 12:02:51 +0800
committerAlex Shi <alex.shi@linaro.org>2017-10-04 12:02:51 +0800
commit95a8e64a288afaadb5e77210df0dfa02ffd0eb43 (patch)
tree3bedc7c74219d261d89a47307e9b519820637093 /fs/ext4/super.c
parent52e49f436844e374d67859cbfb2c9cc62eb7e59b (diff)
parent0e13335254d5d54933969dba1d7625f55e657f52 (diff)
Merge tag 'v3.18.72' into linux-linaro-lsk-v3.18lsk-v3.18-17.09
This is the 3.18.72 stable release
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r--fs/ext4/super.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index a5200023e604..a64e4368bb58 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -2205,7 +2205,7 @@ static void ext4_orphan_cleanup(struct super_block *sb,
#ifdef CONFIG_QUOTA
/* Needed for iput() to work correctly and not trash data */
sb->s_flags |= MS_ACTIVE;
- /* Turn on quotas so that they are updated correctly */
+ /* Turn on journaled quotas so that they are updated correctly */
for (i = 0; i < EXT4_MAXQUOTAS; i++) {
if (EXT4_SB(sb)->s_qf_names[i]) {
int ret = ext4_quota_on_mount(sb, i);
@@ -2271,9 +2271,9 @@ static void ext4_orphan_cleanup(struct super_block *sb,
ext4_msg(sb, KERN_INFO, "%d truncate%s cleaned up",
PLURAL(nr_truncates));
#ifdef CONFIG_QUOTA
- /* Turn quotas off */
+ /* Turn off journaled quotas if they were enabled for orphan cleanup */
for (i = 0; i < EXT4_MAXQUOTAS; i++) {
- if (sb_dqopt(sb)->files[i])
+ if (EXT4_SB(sb)->s_qf_names[i] && sb_dqopt(sb)->files[i])
dquot_quota_off(sb, i);
}
#endif