]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
man/man2/mount.2: Expand and clarify docs for MS_REMOUNT | MS_BIND
authorAskar Safin <safinaskar@zohomail.com>
Tue, 26 Aug 2025 08:32:26 +0000 (08:32 +0000)
committerAlejandro Colomar <alx@kernel.org>
Sat, 6 Sep 2025 20:21:08 +0000 (22:21 +0200)
My edit is based on experiments and reading Linux code.

Signed-off-by: Askar Safin <safinaskar@zohomail.com>
Message-ID: <20250826083227.2611457-2-safinaskar@zohomail.com>
Reviewed-by: Aleksa Sarai <cyphar@cyphar.com>
[alx: wfix]
Signed-off-by: Alejandro Colomar <alx@kernel.org>
man/man2/mount.2

index 5d83231f923ed2bf03f430ce83b5a6700c7aebb3..9cb69a1c750ef570532349980ed0dcf22d92c29e 100644 (file)
@@ -404,8 +404,23 @@ flag can be used with
 .B MS_BIND
 to modify only the per-mount-point flags.
 .\" See https://lwn.net/Articles/281157/
-This is particularly useful for setting or clearing the "read-only"
-flag on a mount without changing the underlying filesystem.
+This is particularly useful
+for setting or clearing the "read-only" flag on a mount
+without changing the filesystem parameters of the underlying filesystem.
+The
+.I data
+argument is ignored.
+The existing per-mount-point flags of the mount point
+are cleared
+and replaced with those in
+.IR mountflags .
+This means that
+if you wish to preserve
+any existing per-mount-point flags,
+you need to include them in
+.IR mountflags ,
+along with the per-mount-point flags you wish to set
+(or with the flags you wish to clear missing).
 Specifying
 .I mountflags
 as:
@@ -416,8 +431,9 @@ MS_REMOUNT | MS_BIND | MS_RDONLY
 .EE
 .in
 .P
-will make access through this mountpoint read-only, without affecting
-other mounts.
+will make access through this mount point read-only
+(clearing all other per-mount-point flags),
+without affecting other mounts of this filesystem.
 .\"
 .SS Creating a bind mount
 If