aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2012-03-21 06:30:40 -0400
committerSteve French <sfrench@us.ibm.com>2012-03-21 12:26:14 -0400
commit1daaae8fa4afe3df78ca34e724ed7e8187e4eb32 (patch)
tree89e445c3fab48ac07aea3ea38b8f0e3d0093dd8b /fs/cifs
parent10b9b98e41ba248a899f6175ce96ee91431b6194 (diff)
cifs: fix issue mounting of DFS ROOT when redirecting from one domain controller to the next
This patch fixes an issue when cifs_mount receives a STATUS_BAD_NETWORK_NAME error during cifs_get_tcon but is able to continue after an DFS ROOT referral. In this case, the return code variable is not reset prior to trying to mount from the system referred to. Thus, is_path_accessible is not executed and the final DFS referral is not performed causing a mount error. Use case: In DNS, example.com resolves to the secondary AD server ad2.example.com Our primary domain controller is ad1.example.com and has a DFS redirection set up from \\ad1\share\Users to \\files\share\Users. Mounting \\example.com\share\Users fails. Regression introduced by commit 724d9f1. Cc: stable@vger.kernel.org Reviewed-by: Pavel Shilovsky <piastry@etersoft.ru Signed-off-by: Thomas Hadig <thomas@intapp.com> Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/connect.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 03f71fb40a8a..0ac595c8c262 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -3368,7 +3368,7 @@ cifs_ra_pages(struct cifs_sb_info *cifs_sb)
3368int 3368int
3369cifs_mount(struct cifs_sb_info *cifs_sb, struct smb_vol *volume_info) 3369cifs_mount(struct cifs_sb_info *cifs_sb, struct smb_vol *volume_info)
3370{ 3370{
3371 int rc = 0; 3371 int rc;
3372 int xid; 3372 int xid;
3373 struct cifs_ses *pSesInfo; 3373 struct cifs_ses *pSesInfo;
3374 struct cifs_tcon *tcon; 3374 struct cifs_tcon *tcon;
@@ -3395,6 +3395,7 @@ try_mount_again:
3395 FreeXid(xid); 3395 FreeXid(xid);
3396 } 3396 }
3397#endif 3397#endif
3398 rc = 0;
3398 tcon = NULL; 3399 tcon = NULL;
3399 pSesInfo = NULL; 3400 pSesInfo = NULL;
3400 srvTcp = NULL; 3401 srvTcp = NULL;