All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] debugfs show actual source in /proc/mounts
@ 2024-08-10 19:25 Marc Aurèle La France
  2024-08-13  9:54 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 10+ messages in thread
From: Marc Aurèle La France @ 2024-08-10 19:25 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rafael J. Wysocki, Christian Brauner,
	David Howells, Eric Sandeen, linux-kernel

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 <tsi@tuyoix.net>
Fixes: a20971c18752 ("vfs: Convert debugfs to use the new mount API")
Cc: stable@vger.kernel.org # 6.10.x: 9f111059e725: fs_parse: add uid & gid option option parsing helpers
Cc: stable@vger.kernel.org # 6.10.x: 49abee5991e1: debugfs: Convert to new uid/gid option parsing helpers

diff -NRapruz -X /etc/diff.excludes linux-6.11.0-rc2/fs/debugfs/inode.c devel-6.11.0-rc2/fs/debugfs/inode.c
--- linux-6.11.0-rc2/fs/debugfs/inode.c	2024-08-04 14:50:53.000000000 -0600
+++ devel-6.11.0-rc2/fs/debugfs/inode.c	2024-08-05 17:12:45.414338128 -0600
@@ -89,12 +89,14 @@ enum {
 	Opt_uid,
 	Opt_gid,
 	Opt_mode,
+	Opt_source,
 };

 static const struct fs_parameter_spec debugfs_param_specs[] = {
 	fsparam_gid	("gid",		Opt_gid),
 	fsparam_u32oct	("mode",	Opt_mode),
 	fsparam_uid	("uid",		Opt_uid),
+	fsparam_string	("source",	Opt_source),
 	{}
 };

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

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

end of thread, other threads:[~2024-08-31  3:51 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-10 19:25 [PATCH] debugfs show actual source in /proc/mounts Marc Aurèle La France
2024-08-13  9:54 ` Greg Kroah-Hartman
2024-08-13 19:18   ` Eric Sandeen
2024-08-14  4:50     ` Greg Kroah-Hartman
2024-08-14 15:20       ` Eric Sandeen
2024-08-14 15:26         ` Greg Kroah-Hartman
2024-08-19  1:29     ` Marc Aurèle La France
2024-08-30  3:44       ` Marc Aurèle La France
2024-08-30 13:38         ` Eric Sandeen
2024-08-31  3:51           ` Marc Aurèle La France

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.