diff options
author | Lukas Czerner <lczerner@redhat.com> | 2022-01-04 15:35:18 +0100 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2022-01-10 13:25:55 -0500 |
commit | 4c1bd5a90c4e716e5bde33f01a40bb66dc4a9903 (patch) | |
tree | caf6e0fb49eb9a6e47b32c60574b5ba93e69c725 /fs/ext4 | |
parent | 13b215a9e657808414a2159b0dec90f1c31ebe05 (diff) |
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 <lczerner@redhat.com>
Fixes: e6e268cb6822 ("ext4: move quota configuration out of handle_mount_opt()")
Link: https://lore.kernel.org/r/20220104143518.134465-2-lczerner@redhat.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4')
-rw-r--r-- | fs/ext4/super.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 72e4dfc9acaf..435f24787030 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -2635,12 +2635,13 @@ static void ext4_apply_quota_options(struct fs_context *fc, continue; qname = ctx->s_qf_names[i]; /* May be NULL */ + if (qname) + set_opt(sb, QUOTA); ctx->s_qf_names[i] = NULL; qname = rcu_replace_pointer(sbi->s_qf_names[i], qname, lockdep_is_held(&sb->s_umount)); if (qname) kfree_rcu(qname); - set_opt(sb, QUOTA); } } |