summaryrefslogtreecommitdiff
path: root/fs/namespace.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2014-08-18 15:09:26 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-09-17 09:19:22 -0700
commitc532b9ce36b10a5b34def0870f5bd7dafc4b1384 (patch)
treec8d12d90719a264e1cdfe04c73e0566db1d1b3c7 /fs/namespace.c
parent93927a247ca105482a9dbaf58a739c5db2546990 (diff)
downloadlwn-c532b9ce36b10a5b34def0870f5bd7dafc4b1384.tar.gz
lwn-c532b9ce36b10a5b34def0870f5bd7dafc4b1384.zip
get rid of propagate_umount() mistakenly treating slaves as busy.
commit 88b368f27a094277143d8ecd5a056116f6a41520 upstream. The check in __propagate_umount() ("has somebody explicitly mounted something on that slave?") is done *before* taking the already doomed victims out of the child lists. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/namespace.c')
-rw-r--r--fs/namespace.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index 9954f6032546..7af0433b79bc 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -1253,6 +1253,9 @@ void umount_tree(struct mount *mnt, int how)
hlist_add_head(&p->mnt_hash, &tmp_list);
}
+ hlist_for_each_entry(p, &tmp_list, mnt_hash)
+ list_del_init(&p->mnt_child);
+
if (how)
propagate_umount(&tmp_list);
@@ -1263,7 +1266,6 @@ void umount_tree(struct mount *mnt, int how)
p->mnt_ns = NULL;
if (how < 2)
p->mnt.mnt_flags |= MNT_SYNC_UMOUNT;
- list_del_init(&p->mnt_child);
if (mnt_has_parent(p)) {
put_mountpoint(p->mnt_mp);
/* move the reference to mountpoint into ->mnt_ex_mountpoint */