From: Christian Brauner Date: Mon, 27 May 2024 12:15:22 +0000 (+0200) Subject: debugfs: continue to ignore unknown mount options X-Git-Tag: v6.10-rc4~32^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0c07c273a5fe1a25d4f477fe7edf64b3e8b19b3d;p=thirdparty%2Flinux.git debugfs: continue to ignore unknown mount options Wolfram reported that debugfs remained empty on some of his boards triggering the message "debugfs: Unknown parameter 'auto'". The root of the issue is that we ignored unknown mount options in the old mount api but we started rejecting unknown mount options in the new mount api. Continue to ignore unknown mount options to not regress userspace. Fixes: a20971c18752 ("vfs: Convert debugfs to use the new mount API") Link: https://lore.kernel.org/r/20240527100618.np2wqiw5mz7as3vk@ninjato Reported-by: Wolfram Sang Tested-by: Wolfram Sang Signed-off-by: Christian Brauner --- diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c index dc51df0b118d0..8fd928899a59e 100644 --- a/fs/debugfs/inode.c +++ b/fs/debugfs/inode.c @@ -107,8 +107,16 @@ static int debugfs_parse_param(struct fs_context *fc, struct fs_parameter *param int opt; opt = fs_parse(fc, debugfs_param_specs, param, &result); - if (opt < 0) + if (opt < 0) { + /* + * We might like to report bad mount options here; but + * traditionally debugfs has ignored all mount options + */ + if (opt == -ENOPARAM) + return 0; + return opt; + } switch (opt) { case Opt_uid: