aboutsummaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2014-12-24 07:35:10 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-05-06 22:03:50 +0200
commita15f7b5e276d1b8f71d3d64d7f3f509e77bee5e4 (patch)
tree7cb0e4505f82aa4dc943f57b247a2be02a5004cf /fs
parent1527fbabfa4fdb32f66b47dd48518572fb4e0eaa (diff)
mnt: Don't propagate umounts in __detach_mounts
commit 8318e667f176f7ea34451a1a530634e293f216ac upstream. Invoking mount propagation from __detach_mounts is inefficient and wrong. It is inefficient because __detach_mounts already walks the list of mounts that where something needs to be done, and mount propagation walks some subset of those mounts again. It is actively wrong because if the dentry that is passed to __detach_mounts is not part of the path to a mount that mount should not be affected. change_mnt_propagation(p,MS_PRIVATE) modifies the mount propagation tree of a master mount so it's slaves are connected to another master if possible. Which means even removing a mount from the middle of a mount tree with __detach_mounts will not deprive any mount propagated mount events. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/namespace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index 712b3c5bddd6..616a694391d6 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -1487,7 +1487,7 @@ void __detach_mounts(struct dentry *dentry)
lock_mount_hash();
while (!hlist_empty(&mp->m_list)) {
mnt = hlist_entry(mp->m_list.first, struct mount, mnt_mp_list);
- umount_tree(mnt, UMOUNT_PROPAGATE);
+ umount_tree(mnt, 0);
}
unlock_mount_hash();
put_mountpoint(mp);