Skip to content

Commit 0c07c27

Browse files
committed
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: a20971c ("vfs: Convert debugfs to use the new mount API") Link: https://lore.kernel.org/r/20240527100618.np2wqiw5mz7as3vk@ninjato Reported-by: Wolfram Sang <[email protected]> Tested-by: Wolfram Sang <[email protected]> Signed-off-by: Christian Brauner <[email protected]>
1 parent 2bfcfd5 commit 0c07c27

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

fs/debugfs/inode.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,16 @@ static int debugfs_parse_param(struct fs_context *fc, struct fs_parameter *param
107107
int opt;
108108

109109
opt = fs_parse(fc, debugfs_param_specs, param, &result);
110-
if (opt < 0)
110+
if (opt < 0) {
111+
/*
112+
* We might like to report bad mount options here; but
113+
* traditionally debugfs has ignored all mount options
114+
*/
115+
if (opt == -ENOPARAM)
116+
return 0;
117+
111118
return opt;
119+
}
112120

113121
switch (opt) {
114122
case Opt_uid:

0 commit comments

Comments
 (0)