summaryrefslogtreecommitdiff
path: root/fs/pnode.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2014-08-18 23:09:26 +0400
committerZefan Li <lizefan@huawei.com>2014-12-01 13:02:21 +0300
commitf9c3484ebd0a5a4918c50612c8400e4ab91ebf92 (patch)
treecebe659d48131e32ff6bbcbc7aab423b27c287e0 /fs/pnode.c
parent9b9d7b3078f8f4a8fa4b72aa2abd118602f942f2 (diff)
downloadlinux-f9c3484ebd0a5a4918c50612c8400e4ab91ebf92.tar.xz
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> [lizf: Backported to 3.4: - adjust context - s/hlist_for_each_entry/list_for_each_entry/] Signed-off-by: Zefan Li <lizefan@huawei.com>
Diffstat (limited to 'fs/pnode.c')
-rw-r--r--fs/pnode.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/pnode.c b/fs/pnode.c
index ab5fa9e1a79a..f61dcb4f994c 100644
--- a/fs/pnode.c
+++ b/fs/pnode.c
@@ -333,8 +333,10 @@ static void __propagate_umount(struct mount *mnt)
* umount the child only if the child has no
* other children
*/
- if (child && list_empty(&child->mnt_mounts))
+ if (child && list_empty(&child->mnt_mounts)) {
+ list_del_init(&child->mnt_child);
list_move_tail(&child->mnt_hash, &mnt->mnt_hash);
+ }
}
}