aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/connect.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r--fs/cifs/connect.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 7cf8b1632242..70a34d126001 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -2767,14 +2767,14 @@ out:
2767} 2767}
2768 2768
2769int 2769int
2770get_dfs_path(unsigned int xid, struct cifs_ses *ses, const char *old_path, 2770get_dfs_path(const unsigned int xid, struct cifs_ses *ses, const char *old_path,
2771 const struct nls_table *nls_codepage, unsigned int *num_referrals, 2771 const struct nls_table *nls_codepage, unsigned int *num_referrals,
2772 struct dfs_info3_param **referrals, int remap) 2772 struct dfs_info3_param **referrals, int remap)
2773{ 2773{
2774 char *temp_unc; 2774 char *temp_unc;
2775 int rc = 0; 2775 int rc = 0;
2776 2776
2777 if (!ses->server->ops->tree_connect) 2777 if (!ses->server->ops->tree_connect || !ses->server->ops->get_dfs_refer)
2778 return -ENOSYS; 2778 return -ENOSYS;
2779 2779
2780 *num_referrals = 0; 2780 *num_referrals = 0;
@@ -2796,11 +2796,12 @@ get_dfs_path(unsigned int xid, struct cifs_ses *ses, const char *old_path,
2796 kfree(temp_unc); 2796 kfree(temp_unc);
2797 } 2797 }
2798 if (rc == 0) 2798 if (rc == 0)
2799 rc = CIFSGetDFSRefer(xid, ses, old_path, referrals, 2799 rc = ses->server->ops->get_dfs_refer(xid, ses, old_path,
2800 num_referrals, nls_codepage, remap); 2800 referrals, num_referrals,
2801 nls_codepage, remap);
2801 /* 2802 /*
2802 * BB - map targetUNCs to dfs_info3 structures, here or in 2803 * BB - map targetUNCs to dfs_info3 structures, here or in
2803 * CIFSGetDFSRefer. 2804 * ses->server->ops->get_dfs_refer.
2804 */ 2805 */
2805 2806
2806 return rc; 2807 return rc;
@@ -3488,7 +3489,7 @@ build_unc_path_to_root(const struct smb_vol *vol,
3488 * determine whether there were referrals. 3489 * determine whether there were referrals.
3489 */ 3490 */
3490static int 3491static int
3491expand_dfs_referral(unsigned int xid, struct cifs_ses *pSesInfo, 3492expand_dfs_referral(const unsigned int xid, struct cifs_ses *ses,
3492 struct smb_vol *volume_info, struct cifs_sb_info *cifs_sb, 3493 struct smb_vol *volume_info, struct cifs_sb_info *cifs_sb,
3493 int check_prefix) 3494 int check_prefix)
3494{ 3495{
@@ -3504,7 +3505,7 @@ expand_dfs_referral(unsigned int xid, struct cifs_ses *pSesInfo,
3504 /* For DFS paths, skip the first '\' of the UNC */ 3505 /* For DFS paths, skip the first '\' of the UNC */
3505 ref_path = check_prefix ? full_path + 1 : volume_info->UNC + 1; 3506 ref_path = check_prefix ? full_path + 1 : volume_info->UNC + 1;
3506 3507
3507 rc = get_dfs_path(xid, pSesInfo , ref_path, cifs_sb->local_nls, 3508 rc = get_dfs_path(xid, ses, ref_path, cifs_sb->local_nls,
3508 &num_referrals, &referrals, 3509 &num_referrals, &referrals,
3509 cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); 3510 cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
3510 3511