mount_namespaces.7: Clarify implications for other NS if mount point is removed in one NS

If a mount point is deleted or renamed or removed in one mount
namespace, this will cause an object that is mounted at that
location in another mount namespace to be unmounted (as verified
by experiment). This was implied by the existing text, but it is
better to make this detail explicit.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2019-07-23 23:04:27 +02:00
parent 930e2ffac4
commit dc95a3a39f
1 changed files with 11 additions and 2 deletions

View File

@ -1,4 +1,4 @@
.\" Copyright (c) 2016 by Michael Kerrisk <mtk.manpages@gmail.com>
.\" Copyright (c) 2016, 2019 by Michael Kerrisk <mtk.manpages@gmail.com>
.\"
.\" %%%LICENSE_START(VERBATIM)
.\" Permission is granted to make and distribute verbatim copies of this
@ -122,8 +122,17 @@ a mount point in another namespace, may be renamed, unlinked, or removed
.RB ( rmdir (2))
in the mount namespace in which it is not a mount point
(subject to the usual permission checks).
Consequently, the mount point is removed in the mount namespace
where it was a mount point.
.IP
Previously, attempting to unlink, rename, or remove a file or directory
Previously (before Linux 3.18),
.\" mtk: The change was in Linux 3.18, I think, with this commit:
.\" commit 8ed936b5671bfb33d89bc60bdcc7cf0470ba52fe
.\" Author: Eric W. Biederman <ebiederman@twitter.com>
.\" Date: Tue Oct 1 18:33:48 2013 -0700
.\"
.\" vfs: Lazily remove mounts on unlinked files and directories.
attempting to unlink, rename, or remove a file or directory
that was a mount point in another mount namespace would result in the error
.BR EBUSY .
That behavior had technical problems of enforcement (e.g., for NFS)