diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-05-29 22:03:48 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-06-09 11:33:01 -0400 |
commit | 6baeff72b712f09aec676153d5b752dffaf90c17 (patch) | |
tree | 678850659f00ad823f2a0dae7fc1cd968a79ba63 /fs | |
parent | a6923156ec0556f79a8ec5deb40d1aa929184b21 (diff) |
vfs: umount_tree() might be called on subtree that had never made it
commit 63d37a84ab6004c235314ffd7a76c5eb28c2fae0 upstream.
__mnt_make_shortterm() in there undoes the effect of __mnt_make_longterm()
we'd done back when we set ->mnt_ns non-NULL; it should not be done to
vfsmounts that had never gone through commit_tree() and friends. Kudos to
lczerner for catching that one...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/namespace.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/namespace.c b/fs/namespace.c index edc1c4aef75..b3d8f51c6fa 100644 --- a/fs/namespace.c +++ b/fs/namespace.c | |||
@@ -1244,8 +1244,9 @@ void umount_tree(struct vfsmount *mnt, int propagate, struct list_head *kill) | |||
1244 | list_del_init(&p->mnt_expire); | 1244 | list_del_init(&p->mnt_expire); |
1245 | list_del_init(&p->mnt_list); | 1245 | list_del_init(&p->mnt_list); |
1246 | __touch_mnt_namespace(p->mnt_ns); | 1246 | __touch_mnt_namespace(p->mnt_ns); |
1247 | if (p->mnt_ns) | ||
1248 | __mnt_make_shortterm(p); | ||
1247 | p->mnt_ns = NULL; | 1249 | p->mnt_ns = NULL; |
1248 | __mnt_make_shortterm(p); | ||
1249 | list_del_init(&p->mnt_child); | 1250 | list_del_init(&p->mnt_child); |
1250 | if (p->mnt_parent != p) { | 1251 | if (p->mnt_parent != p) { |
1251 | p->mnt_parent->mnt_ghosts++; | 1252 | p->mnt_parent->mnt_ghosts++; |