cifs_get_tcon() could return any of the following errors:
-ENOMEM/-ENODEV/EREMOTEIO. We should follow the DFS referral code path only
when we get -EREMOTEIO (STATUS_PATH_NOT_COVERED) from the server and not
otherwise.

Compile-tested only.

Signed-off-by: Suresh Jayaraman <[email protected]>
---
 fs/cifs/connect.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 251a17c..c3a2323 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 == -EREMOTEIO)
+                       goto remote_path_check;
+               else
+                       goto mount_fail_check;
        }
 
        /* do not care if following two calls succeed - informational */
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to