[git commit] mount: implement -o nosymfollow, remove bogus -o union

Denys Vlasenko vda.linux at googlemail.com
Sun Dec 6 20:56:22 UTC 2020


commit: https://git.busybox.net/busybox/commit/?id=34c5115a7fb2adb7562b5638264112f5d83bf6cf
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master

The (1 << 8) MS_ flag is MS_NOSYMFOLLOW, not MS_UNION.
As far as I see in git history of kernel and util-linux,
MS_UNION did not ever exist.
Why did it appear in our tree in 2009?...

function                                             old     new   delta
mount_option_str                                     379     385      +6

Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 util-linux/mount.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/util-linux/mount.c b/util-linux/mount.c
index 25d884a24..2eadee88b 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -188,8 +188,8 @@
 #ifndef MS_DIRSYNC
 # define MS_DIRSYNC     (1 << 7) // Directory modifications are synchronous
 #endif
-#ifndef MS_UNION
-# define MS_UNION       (1 << 8)
+#ifndef MS_NOSYMFOLLOW
+# define MS_NOSYMFOLLOW (1 << 8)
 #endif
 #ifndef MS_BIND
 # define MS_BIND        (1 << 12)
@@ -368,13 +368,13 @@ static const int32_t mount_options[] ALIGN4 = {
 		/* "nostrictatime"*/ ~MS_STRICTATIME,
 		/* "lazytime"    */ MS_LAZYTIME,
 		/* "nolazytime"  */ ~MS_LAZYTIME,
+		/* "nosymfollow" */ MS_NOSYMFOLLOW,
 		/* "mand"        */ MS_MANDLOCK,
 		/* "nomand"      */ ~MS_MANDLOCK,
 		/* "loud"      	 */ ~MS_SILENT,
 
 		// action flags
 		/* "rbind"       */ MS_BIND|MS_RECURSIVE,
-		/* "union"       */ MS_UNION,
 		/* "bind"        */ MS_BIND,
 		/* "move"        */ MS_MOVE,
 		/* "shared"      */ MS_SHARED,
@@ -430,13 +430,13 @@ static const char mount_option_str[] ALIGN1 =
 		"nostrictatime""\0"
 		"lazytime"     "\0"
 		"nolazytime"   "\0"
+		"nosymfollow"  "\0"
 		"mand"         "\0"
 		"nomand"       "\0"
 		"loud"         "\0"
 
 		// action flags
 		"rbind\0"
-		"union\0"
 		"bind\0"
 		"move\0"
 		"make-shared\0"


More information about the busybox-cvs mailing list