diff options
author | Pavel Shilovsky <pshilovsky@samba.org> | 2012-05-27 20:21:53 +0400 |
---|---|---|
committer | Pavel Shilovsky <pshilovsky@samba.org> | 2012-07-24 21:55:01 +0400 |
commit | b669f33ca61738171aecc5ae90d776d91b122eb8 (patch) | |
tree | 71b83c4f7155b2297f6b00bbe41c89e572d1b9fe /fs/cifs/connect.c | |
parent | aa24d1e9692411e605084938ced6b160f92df454 (diff) | |
download | op-kernel-dev-b669f33ca61738171aecc5ae90d776d91b122eb8.zip op-kernel-dev-b669f33ca61738171aecc5ae90d776d91b122eb8.tar.gz |
CIFS: Move getting dfs referalls to ops struct
Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org>
Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r-- | fs/cifs/connect.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 7cf8b16..70a34d1 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -2767,14 +2767,14 @@ out: } int -get_dfs_path(unsigned int xid, struct cifs_ses *ses, const char *old_path, +get_dfs_path(const unsigned int xid, struct cifs_ses *ses, const char *old_path, const struct nls_table *nls_codepage, unsigned int *num_referrals, struct dfs_info3_param **referrals, int remap) { char *temp_unc; int rc = 0; - if (!ses->server->ops->tree_connect) + if (!ses->server->ops->tree_connect || !ses->server->ops->get_dfs_refer) return -ENOSYS; *num_referrals = 0; @@ -2796,11 +2796,12 @@ get_dfs_path(unsigned int xid, struct cifs_ses *ses, const char *old_path, kfree(temp_unc); } if (rc == 0) - rc = CIFSGetDFSRefer(xid, ses, old_path, referrals, - num_referrals, nls_codepage, remap); + rc = ses->server->ops->get_dfs_refer(xid, ses, old_path, + referrals, num_referrals, + nls_codepage, remap); /* * BB - map targetUNCs to dfs_info3 structures, here or in - * CIFSGetDFSRefer. + * ses->server->ops->get_dfs_refer. */ return rc; @@ -3488,7 +3489,7 @@ build_unc_path_to_root(const struct smb_vol *vol, * determine whether there were referrals. */ static int -expand_dfs_referral(unsigned int xid, struct cifs_ses *pSesInfo, +expand_dfs_referral(const unsigned int xid, struct cifs_ses *ses, struct smb_vol *volume_info, struct cifs_sb_info *cifs_sb, int check_prefix) { @@ -3504,7 +3505,7 @@ expand_dfs_referral(unsigned int xid, struct cifs_ses *pSesInfo, /* For DFS paths, skip the first '\' of the UNC */ ref_path = check_prefix ? full_path + 1 : volume_info->UNC + 1; - rc = get_dfs_path(xid, pSesInfo , ref_path, cifs_sb->local_nls, + rc = get_dfs_path(xid, ses, ref_path, cifs_sb->local_nls, &num_referrals, &referrals, cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); |