cifs: more breakage on mount failures

if cifs_get_root() fails, we end up with ->mount() returning NULL,
which is not what callers expect.  Moreover, in case of superblock
reuse we end up leaking a superblock reference...

Acked-by: Pavel Shilovsky <piastryyy@gmail.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index ba2b2da..234e9d0 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -710,17 +710,14 @@
 
 	sb->s_flags |= MS_ACTIVE;
 
-	root = cifs_get_root(volume_info, sb);
-	if (root == NULL)
-		goto out_super;
-
-	cFYI(1, "dentry root is: %p", root);
-	goto out;
-
 out_shared:
 	root = cifs_get_root(volume_info, sb);
-	if (root)
-		cFYI(1, "dentry root is: %p", root);
+	if (root == NULL) {
+		root = ERR_PTR(-EINVAL); /* XXX */
+		goto out_super;
+	}
+
+	cFYI(1, "dentry root is: %p", root);
 	goto out;
 
 out_super: