aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2012-03-21 06:30:40 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-04-02 09:27:17 -0700
commit9dc6752a3a9a2e8175be539e570268c05397c9a6 (patch)
tree44413bf17df53846c2052e89afc4c198e546bd2c /fs/cifs
parentc5ee1ac24b6f878e63fd208984b3cfe3ccf7b9a8 (diff)
downloadkernel_samsung_smdk4412-9dc6752a3a9a2e8175be539e570268c05397c9a6.zip
kernel_samsung_smdk4412-9dc6752a3a9a2e8175be539e570268c05397c9a6.tar.gz
kernel_samsung_smdk4412-9dc6752a3a9a2e8175be539e570268c05397c9a6.tar.bz2
cifs: fix issue mounting of DFS ROOT when redirecting from one domain controller to the next
commit 1daaae8fa4afe3df78ca34e724ed7e8187e4eb32 upstream. 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. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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 cb85825..b775809 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -3004,7 +3004,7 @@ cifs_get_volume_info(char *mount_data, const char *devname)
int
cifs_mount(struct cifs_sb_info *cifs_sb, struct smb_vol *volume_info)
{
- int rc = 0;
+ int rc;
int xid;
struct cifs_ses *pSesInfo;
struct cifs_tcon *tcon;
@@ -3033,6 +3033,7 @@ try_mount_again:
FreeXid(xid);
}
#endif
+ rc = 0;
tcon = NULL;
pSesInfo = NULL;
srvTcp = NULL;