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
committerBen Hutchings <ben@decadent.org.uk>2012-06-10 14:41:51 +0100
commit0264b862b122cdfda51029c78382e0b7865a3cd9 (patch)
tree66fd1ccb58d0027f67bae3affa6de01805ce2e49 /fs/namespace.c
parente384357a14c49f0107a061cb089c89a59d8a3b20 (diff)
downloadkernel_samsung_smdk4412-0264b862b122cdfda51029c78382e0b7865a3cd9.zip
kernel_samsung_smdk4412-0264b862b122cdfda51029c78382e0b7865a3cd9.tar.gz
kernel_samsung_smdk4412-0264b862b122cdfda51029c78382e0b7865a3cd9.tar.bz2
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: Ben Hutchings <ben@decadent.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 cfc6d44..ca4913a 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)
list_del_init(&p->mnt_expire);
list_del_init(&p->mnt_list);
__touch_mnt_namespace(p->mnt_ns);
+ if (p->mnt_ns)
+ __mnt_make_shortterm(p);
p->mnt_ns = NULL;
- __mnt_make_shortterm(p);
list_del_init(&p->mnt_child);
if (p->mnt_parent != p) {
p->mnt_parent->mnt_ghosts++;