diff mbox

cifs: handle cifs_get_tcon() errors properly

Message ID 4CE149B1.5090901@suse.de (mailing list archive)
State New, archived
Headers show

Commit Message

Suresh Jayaraman Nov. 15, 2010, 2:54 p.m. UTC
None
diff mbox

Patch

diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 251a17c..6dbc145 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -2780,7 +2780,10 @@  try_mount_again:
 	if (IS_ERR(tcon)) {
 		rc = PTR_ERR(tcon);
 		tcon = NULL;
-		goto remote_path_check;
+		if (rc == -EREMOTE)
+			goto remote_path_check;
+		else
+			goto mount_fail_check;
 	}
 
 	/* do not care if following two calls succeed - informational */