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...

CR's-Fixed: 914867
Change-Id: I6022d463213413d3849e75f57f552b4cff0a6c57
Cc: stable@vger.kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Git-commit: 63d37a84ab6004c235314ffd7a76c5eb28c2fae0
Git-repo: https://android.googlesource.com/kernel/common/
Signed-off-by: Swetha Chikkaboraiah <schikk@codeaurora.org>
diff --git a/fs/namespace.c b/fs/namespace.c
index 34d97ca..be55bbb 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -1076,8 +1076,9 @@
 		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 (mnt_has_parent(p)) {
 			p->mnt_parent->mnt_ghosts++;