From dc95a3a39f3d5b8b6d3d2f27ab0d8f69ba5607a0 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Tue, 23 Jul 2019 23:04:27 +0200 Subject: [PATCH] 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 --- man7/mount_namespaces.7 | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/man7/mount_namespaces.7 b/man7/mount_namespaces.7 index 11d07bbcf..a2e6a6bac 100644 --- a/man7/mount_namespaces.7 +++ b/man7/mount_namespaces.7 @@ -1,4 +1,4 @@ -.\" Copyright (c) 2016 by Michael Kerrisk +.\" Copyright (c) 2016, 2019 by Michael Kerrisk .\" .\" %%%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 +.\" 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)