From: Lukas Czerner <lczerner@redhat.com>
To: linux-ext4@vger.kernel.org, tytso@mit.edu
Subject: [PATCH 2/2] ext4: only set EXT4_MOUNT_QUOTA when journalled quota file is specified
Date: Tue, 4 Jan 2022 15:35:18 +0100 [thread overview]
Message-ID: <20220104143518.134465-2-lczerner@redhat.com> (raw)
In-Reply-To: <20220104143518.134465-1-lczerner@redhat.com>
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()")
---
fs/ext4/super.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index acb0c58cd3d1..52e0be447b9f 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -2632,12 +2632,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);
}
}
--
2.31.1
next prev parent reply other threads:[~2022-01-04 14:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-04 14:35 [PATCH 1/2] ext4: don't use kfree() on rcu protected pointer sbi->s_qf_names Lukas Czerner
2022-01-04 14:35 ` Lukas Czerner [this message]
2022-01-05 3:14 ` Theodore Ts'o
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220104143518.134465-2-lczerner@redhat.com \
--to=lczerner@redhat.com \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).