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 --- 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