[PATCH v2] mount: don't pass 'auto' parameter to the kernel
Wolfram Sang
wsa+renesas at sang-engineering.com
Thu Jan 2 10:01:39 UTC 2025
Various filesystems are converted now to the new mount API which does
not silently ignore the 'auto' option. So, mounting e.g. debugfs in
fstab with 'auto' currently fails. Despite the ongoing discussion if
this is a regression[1], it was also mentioned that 'auto' should have
never been sent to the kernel in the first place. So, add it to the list
of options which are handled within 'mount' itself and, thus, are not
sent to the kernel.
[1] https://lore.kernel.org/all/39a2d0a7-20f3-4a51-b2e0-1ade3eab14c5@sandeen.net/
Reported-by: Eric Sandeen <sandeen at redhat.com>
Signed-off-by: Wolfram Sang <wsa+renesas at sang-engineering.com>
---
Changes since v1:
* Improved patch description
* Added Denys to CC.
@Eric: could you maybe ack this patch to confirm the right thing is to
not send 'auto' to the kernel?
util-linux/mount.c | 2 ++
1 file changed, 2 insertions(+)
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -340,6 +340,7 @@ static const int32_t mount_options[] ALI
/* "defaults" */ 0,
/* "quiet" 0 - do not filter out, vfat wants to see it */
/* "noauto" */ MOUNT_NOAUTO,
+ /* "auto" */ ~MOUNT_NOAUTO,
/* "sw" */ MOUNT_SWAP,
/* "swap" */ MOUNT_SWAP,
IF_DESKTOP(/* "user" */ MOUNT_USERS,)
@@ -403,6 +404,7 @@ static const char mount_option_str[] ALI
"defaults\0"
// "quiet\0" - do not filter out, vfat wants to see it
"noauto\0"
+ "auto\0"
"sw\0"
"swap\0"
IF_DESKTOP("user\0")
More information about the busybox
mailing list