From: Askar Safin Date: Tue, 26 Aug 2025 08:32:26 +0000 (+0000) Subject: man/man2/mount.2: Expand and clarify docs for MS_REMOUNT | MS_BIND X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ac2f7481d25104475ee42c83e514847b60ee4bc5;p=thirdparty%2Fman-pages.git 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 Message-ID: <20250826083227.2611457-2-safinaskar@zohomail.com> Reviewed-by: Aleksa Sarai [alx: wfix] Signed-off-by: Alejandro Colomar --- diff --git a/man/man2/mount.2 b/man/man2/mount.2 index 5d83231f9..9cb69a1c7 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