mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] f2fs: allow empty strings for journaled quota options
@ 2026-10-10 16:57 Hengyu Liang
  2026-10-11 10:38 ` Chao Yu
  0 siblings, 1 reply; 2+ messages in thread
From: Hengyu Liang @ 2026-10-10 16:57 UTC (permalink / raw)
  To: jaegeuk, chao
  Cc: linux-f2fs-devel, linux-kernel, daehojeong, joannechien, stable

Commit 2a3db1e02ce0 ("f2fs: allow empty mount string for
Opt_usr|grp|projjquota") added support for passing usrjquota,
grpjquota and prjjquota as flags to disable journaled quotas.

However, it also replaced fsparam_string_empty() with fsparam_string(),
which rejects an empty string. As of now, mount(2) and
fsconfig(FSCONFIG_SET_STRING) reject usrjquota=, grpjquota= and
prjjquota= with EINVAL, although these forms are still documented in
Documentation/filesystems/f2fs.rst.

The issue can be reproduced on an F2FS device with:

    mount -t f2fs -o usrjquota= /dev/loop5 /mnt/f

Before this commit, the command succeeds. Afterwards, it fails with
EINVAL and logs "f2fs: Bad value for 'usrjquota'".
The same failure occurs when remounting to clear a quota file name.

This patch will restore fsparam_string_empty() for the three options
while retaining the flag entries, so both forms are accepted.

Fixes: 2a3db1e02ce0 ("f2fs: allow empty mount string for Opt_usr|grp|projjquota")
Cc: stable@vger.kernel.org # 7.1+
Signed-off-by: Hengyu Liang <hengyul@cs.unc.edu>
---
 fs/f2fs/super.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 1314b6ccced9..3867094b25f6 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -338,11 +338,11 @@ static const struct fs_parameter_spec f2fs_param_specs[] = {
 	fsparam_flag("usrquota", Opt_usrquota),
 	fsparam_flag("grpquota", Opt_grpquota),
 	fsparam_flag("prjquota", Opt_prjquota),
-	fsparam_string("usrjquota", Opt_usrjquota),
+	fsparam_string_empty("usrjquota", Opt_usrjquota),
 	fsparam_flag("usrjquota", Opt_usrjquota),
-	fsparam_string("grpjquota", Opt_grpjquota),
+	fsparam_string_empty("grpjquota", Opt_grpjquota),
 	fsparam_flag("grpjquota", Opt_grpjquota),
-	fsparam_string("prjjquota", Opt_prjjquota),
+	fsparam_string_empty("prjjquota", Opt_prjjquota),
 	fsparam_flag("prjjquota", Opt_prjjquota),
 	fsparam_flag("nat_bits", Opt_nat_bits),
 	fsparam_enum("jqfmt", Opt_jqfmt, f2fs_param_jqfmt),
-- 
2.53.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] f2fs: allow empty strings for journaled quota options
  2026-10-10 16:57 [PATCH] f2fs: allow empty strings for journaled quota options Hengyu Liang
@ 2026-10-11 10:38 ` Chao Yu
  0 siblings, 0 replies; 2+ messages in thread
From: Chao Yu @ 2026-10-11 10:38 UTC (permalink / raw)
  To: Hengyu Liang, jaegeuk
  Cc: chao, linux-f2fs-devel, linux-kernel, daehojeong, joannechien, stable

On 10/11/26 00:57, Hengyu Liang wrote:
> Commit 2a3db1e02ce0 ("f2fs: allow empty mount string for
> Opt_usr|grp|projjquota") added support for passing usrjquota,
> grpjquota and prjjquota as flags to disable journaled quotas.
> 
> However, it also replaced fsparam_string_empty() with fsparam_string(),
> which rejects an empty string. As of now, mount(2) and
> fsconfig(FSCONFIG_SET_STRING) reject usrjquota=, grpjquota= and
> prjjquota= with EINVAL, although these forms are still documented in
> Documentation/filesystems/f2fs.rst.
> 
> The issue can be reproduced on an F2FS device with:
> 
>      mount -t f2fs -o usrjquota= /dev/loop5 /mnt/f
> 
> Before this commit, the command succeeds. Afterwards, it fails with
> EINVAL and logs "f2fs: Bad value for 'usrjquota'".
> The same failure occurs when remounting to clear a quota file name.
> 
> This patch will restore fsparam_string_empty() for the three options
> while retaining the flag entries, so both forms are accepted.
> 
> Fixes: 2a3db1e02ce0 ("f2fs: allow empty mount string for Opt_usr|grp|projjquota")
> Cc: stable@vger.kernel.org # 7.1+
> Signed-off-by: Hengyu Liang <hengyul@cs.unc.edu>

Reviewed-by: Chao Yu <chao@kernel.org>

Thanks,

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-10-11 10:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-10 16:57 [PATCH] f2fs: allow empty strings for journaled quota options Hengyu Liang
2026-10-11 10:38 ` Chao Yu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®