Thread (26 messages) 26 messages, 6 authors, 2025-10-22

[PATCH v2] man/man2/move_mount.2: document EINVAL on multiple instances

From: <hidden>
Date: 2025-10-06 11:31:32
Subsystem: the rest · Maintainer: Linus Torvalds

From: Luca Boccassi <redacted>

open_tree() with OPEN_TREE_CLONE is needed to apply a mount multiple
times, otherwise EINVAL is returned by move_mount(). Available since 6.15.

Signed-off-by: Luca Boccassi <redacted>
---
As requested by Aleksa on https://github.com/brauner/man-pages-md/pull/19
and based on the 'fs' branch where move_mount(2) was added

v2: semantic line break, clarify purpose of mentioning a version

 man/man2/move_mount.2 | 8 ++++++++
 1 file changed, 8 insertions(+)
diff --git a/man/man2/move_mount.2 b/man/man2/move_mount.2
index 13063ac1f..968e6a81a 100644
--- a/man/man2/move_mount.2
+++ b/man/man2/move_mount.2
@@ -457,6 +457,14 @@ which would otherwise cause the unbindable mounts to be propagated
 was attempted,
 but one of the listed restrictions was violated.
 .TP
+.B EINVAL
+The source mount is already mounted somewhere else.
+Since Linux 6.15 it is possible to clone the mount via
+.BR open_tree (2)
+with
+.B \%OPEN_TREE_CLONE
+and use that as the source to avoid this error.
+.TP
 .B ELOOP
 Too many symbolic links encountered
 when resolving one of
-- 
2.47.3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help