aboutsummaryrefslogtreecommitdiffstats
path: root/fs/namespace.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-05-29 22:03:48 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-05-30 21:04:55 -0400
commit63d37a84ab6004c235314ffd7a76c5eb28c2fae0 (patch)
treec147b24bd2604b90a872cefd0569cea5ca3ecdd3 /fs/namespace.c
parent46ce341b2f176c2611f12ac390adf862e932eb02 (diff)
vfs: umount_tree() might be called on subtree that had never made it
__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... Cc: stable@vger.kernel.org Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/namespace.c')
-rw-r--r--fs/namespace.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index 224aff1c0dfd..1e4a5fe3d7b7 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -1074,8 +1074,9 @@ void umount_tree(struct mount *mnt, int propagate, struct list_head *kill)
1074 list_del_init(&p->mnt_expire); 1074 list_del_init(&p->mnt_expire);
1075 list_del_init(&p->mnt_list); 1075 list_del_init(&p->mnt_list);
1076 __touch_mnt_namespace(p->mnt_ns); 1076 __touch_mnt_namespace(p->mnt_ns);
1077 if (p->mnt_ns)
1078 __mnt_make_shortterm(p);
1077 p->mnt_ns = NULL; 1079 p->mnt_ns = NULL;
1078 __mnt_make_shortterm(p);
1079 list_del_init(&p->mnt_child); 1080 list_del_init(&p->mnt_child);
1080 if (mnt_has_parent(p)) { 1081 if (mnt_has_parent(p)) {
1081 p->mnt_parent->mnt_ghosts++; 1082 p->mnt_parent->mnt_ghosts++;