Skip to content

Commit 3a987b8

Browse files
Marc Aurèle La Francebrauner
authored andcommitted
debugfs show actual source in /proc/mounts
After its conversion to the new mount API, debugfs displays "none" in /proc/mounts instead of the actual source. Fix this by recognising its "source" mount option. Signed-off-by: Marc Aurèle La France <[email protected]> Link: https://lore.kernel.org/r/[email protected] Fixes: a20971c ("vfs: Convert debugfs to use the new mount API") Cc: [email protected] # 6.10.x: 49abee5: debugfs: Convert to new uid/gid option parsing helpers Signed-off-by: Christian Brauner <[email protected]>
1 parent 1c48d44 commit 3a987b8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

fs/debugfs/inode.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,14 @@ enum {
8989
Opt_uid,
9090
Opt_gid,
9191
Opt_mode,
92+
Opt_source,
9293
};
9394

9495
static const struct fs_parameter_spec debugfs_param_specs[] = {
9596
fsparam_gid ("gid", Opt_gid),
9697
fsparam_u32oct ("mode", Opt_mode),
9798
fsparam_uid ("uid", Opt_uid),
99+
fsparam_string ("source", Opt_source),
98100
{}
99101
};
100102

@@ -126,6 +128,12 @@ static int debugfs_parse_param(struct fs_context *fc, struct fs_parameter *param
126128
case Opt_mode:
127129
opts->mode = result.uint_32 & S_IALLUGO;
128130
break;
131+
case Opt_source:
132+
if (fc->source)
133+
return invalfc(fc, "Multiple sources specified");
134+
fc->source = param->string;
135+
param->string = NULL;
136+
break;
129137
/*
130138
* We might like to report bad mount options here;
131139
* but traditionally debugfs has ignored all mount options

0 commit comments

Comments
 (0)