aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAskar Safin <safinaskar@zohomail.com>2025-08-26 08:32:26 +0000
committerAlejandro Colomar <alx@kernel.org>2025-09-06 22:21:08 +0200
commitac2f7481d25104475ee42c83e514847b60ee4bc5 (patch)
tree87dccb3dac0423c89df3b323163489a248e54600
parentc27f2edf6a73db7b01418cb0cd7c5359eebb3081 (diff)
downloadman-pages-ac2f7481d25104475ee42c83e514847b60ee4bc5.tar.gz
man/man2/mount.2: Expand and clarify docs for MS_REMOUNT | MS_BIND
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>
-rw-r--r--man/man2/mount.224
1 files changed, 20 insertions, 4 deletions
diff --git a/man/man2/mount.2 b/man/man2/mount.2
index 5d83231f92..9cb69a1c75 100644
--- a/man/man2/mount.2
+++ b/man/man2/mount.2
@@ -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