Skip to content

Commit 4c1bd5a

Browse files
Lukas Czernertytso
authored andcommitted
ext4: only set EXT4_MOUNT_QUOTA when journalled quota file is specified
Only set EXT4_MOUNT_QUOTA when journalled quota file is specified, otherwise simply disabling specific quota type (usrjquota=) will also set the EXT4_MOUNT_QUOTA super block option. Signed-off-by: Lukas Czerner <[email protected]> Fixes: e6e268c ("ext4: move quota configuration out of handle_mount_opt()") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Theodore Ts'o <[email protected]>
1 parent 13b215a commit 4c1bd5a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/ext4/super.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2635,12 +2635,13 @@ static void ext4_apply_quota_options(struct fs_context *fc,
26352635
continue;
26362636

26372637
qname = ctx->s_qf_names[i]; /* May be NULL */
2638+
if (qname)
2639+
set_opt(sb, QUOTA);
26382640
ctx->s_qf_names[i] = NULL;
26392641
qname = rcu_replace_pointer(sbi->s_qf_names[i], qname,
26402642
lockdep_is_held(&sb->s_umount));
26412643
if (qname)
26422644
kfree_rcu(qname);
2643-
set_opt(sb, QUOTA);
26442645
}
26452646
}
26462647

0 commit comments

Comments
 (0)