aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/connect.c
diff options
context:
space:
mode:
authorPavel Shilovsky <pshilovsky@samba.org>2012-06-20 03:21:16 -0400
committerSteve French <smfrench@gmail.com>2012-07-24 11:25:08 -0400
commit6d5786a34d98bffb8ad50d8053d1e53231fe0636 (patch)
treeae49860befc52cb18dfb2b86929878a204289601 /fs/cifs/connect.c
parent2e6e02ab6ddbd539fd7e092973daf057adbd53dc (diff)
CIFS: Rename Get/FreeXid and make them work with unsigned int
Acked-by: Jeff Layton <jlayton@redhat.com> 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.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index fcf20d1b58b9..cfb7e7797642 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -2267,9 +2267,9 @@ cifs_put_smb_ses(struct cifs_ses *ses)
2267 spin_unlock(&cifs_tcp_ses_lock); 2267 spin_unlock(&cifs_tcp_ses_lock);
2268 2268
2269 if (ses->status == CifsGood && server->ops->logoff) { 2269 if (ses->status == CifsGood && server->ops->logoff) {
2270 xid = GetXid(); 2270 xid = get_xid();
2271 server->ops->logoff(xid, ses); 2271 server->ops->logoff(xid, ses);
2272 _FreeXid(xid); 2272 _free_xid(xid);
2273 } 2273 }
2274 sesInfoFree(ses); 2274 sesInfoFree(ses);
2275 cifs_put_tcp_session(server); 2275 cifs_put_tcp_session(server);
@@ -2412,7 +2412,7 @@ cifs_get_smb_ses(struct TCP_Server_Info *server, struct smb_vol *volume_info)
2412 struct sockaddr_in *addr = (struct sockaddr_in *)&server->dstaddr; 2412 struct sockaddr_in *addr = (struct sockaddr_in *)&server->dstaddr;
2413 struct sockaddr_in6 *addr6 = (struct sockaddr_in6 *)&server->dstaddr; 2413 struct sockaddr_in6 *addr6 = (struct sockaddr_in6 *)&server->dstaddr;
2414 2414
2415 xid = GetXid(); 2415 xid = get_xid();
2416 2416
2417 ses = cifs_find_smb_ses(server, volume_info); 2417 ses = cifs_find_smb_ses(server, volume_info);
2418 if (ses) { 2418 if (ses) {
@@ -2424,7 +2424,7 @@ cifs_get_smb_ses(struct TCP_Server_Info *server, struct smb_vol *volume_info)
2424 mutex_unlock(&ses->session_mutex); 2424 mutex_unlock(&ses->session_mutex);
2425 /* problem -- put our ses reference */ 2425 /* problem -- put our ses reference */
2426 cifs_put_smb_ses(ses); 2426 cifs_put_smb_ses(ses);
2427 FreeXid(xid); 2427 free_xid(xid);
2428 return ERR_PTR(rc); 2428 return ERR_PTR(rc);
2429 } 2429 }
2430 if (ses->need_reconnect) { 2430 if (ses->need_reconnect) {
@@ -2435,7 +2435,7 @@ cifs_get_smb_ses(struct TCP_Server_Info *server, struct smb_vol *volume_info)
2435 mutex_unlock(&ses->session_mutex); 2435 mutex_unlock(&ses->session_mutex);
2436 /* problem -- put our reference */ 2436 /* problem -- put our reference */
2437 cifs_put_smb_ses(ses); 2437 cifs_put_smb_ses(ses);
2438 FreeXid(xid); 2438 free_xid(xid);
2439 return ERR_PTR(rc); 2439 return ERR_PTR(rc);
2440 } 2440 }
2441 } 2441 }
@@ -2443,7 +2443,7 @@ cifs_get_smb_ses(struct TCP_Server_Info *server, struct smb_vol *volume_info)
2443 2443
2444 /* existing SMB ses has a server reference already */ 2444 /* existing SMB ses has a server reference already */
2445 cifs_put_tcp_session(server); 2445 cifs_put_tcp_session(server);
2446 FreeXid(xid); 2446 free_xid(xid);
2447 return ses; 2447 return ses;
2448 } 2448 }
2449 2449
@@ -2502,12 +2502,12 @@ cifs_get_smb_ses(struct TCP_Server_Info *server, struct smb_vol *volume_info)
2502 list_add(&ses->smb_ses_list, &server->smb_ses_list); 2502 list_add(&ses->smb_ses_list, &server->smb_ses_list);
2503 spin_unlock(&cifs_tcp_ses_lock); 2503 spin_unlock(&cifs_tcp_ses_lock);
2504 2504
2505 FreeXid(xid); 2505 free_xid(xid);
2506 return ses; 2506 return ses;
2507 2507
2508get_ses_fail: 2508get_ses_fail:
2509 sesInfoFree(ses); 2509 sesInfoFree(ses);
2510 FreeXid(xid); 2510 free_xid(xid);
2511 return ERR_PTR(rc); 2511 return ERR_PTR(rc);
2512} 2512}
2513 2513
@@ -2555,10 +2555,10 @@ cifs_put_tcon(struct cifs_tcon *tcon)
2555 list_del_init(&tcon->tcon_list); 2555 list_del_init(&tcon->tcon_list);
2556 spin_unlock(&cifs_tcp_ses_lock); 2556 spin_unlock(&cifs_tcp_ses_lock);
2557 2557
2558 xid = GetXid(); 2558 xid = get_xid();
2559 if (ses->server->ops->tree_disconnect) 2559 if (ses->server->ops->tree_disconnect)
2560 ses->server->ops->tree_disconnect(xid, tcon); 2560 ses->server->ops->tree_disconnect(xid, tcon);
2561 _FreeXid(xid); 2561 _free_xid(xid);
2562 2562
2563 cifs_fscache_release_super_cookie(tcon); 2563 cifs_fscache_release_super_cookie(tcon);
2564 tconInfoFree(tcon); 2564 tconInfoFree(tcon);
@@ -2613,10 +2613,10 @@ cifs_get_tcon(struct cifs_ses *ses, struct smb_vol *volume_info)
2613 * BB Do we need to wrap session_mutex around this TCon call and Unix 2613 * BB Do we need to wrap session_mutex around this TCon call and Unix
2614 * SetFS as we do on SessSetup and reconnect? 2614 * SetFS as we do on SessSetup and reconnect?
2615 */ 2615 */
2616 xid = GetXid(); 2616 xid = get_xid();
2617 rc = ses->server->ops->tree_connect(xid, ses, volume_info->UNC, tcon, 2617 rc = ses->server->ops->tree_connect(xid, ses, volume_info->UNC, tcon,
2618 volume_info->local_nls); 2618 volume_info->local_nls);
2619 FreeXid(xid); 2619 free_xid(xid);
2620 cFYI(1, "Tcon rc = %d", rc); 2620 cFYI(1, "Tcon rc = %d", rc);
2621 if (rc) 2621 if (rc)
2622 goto out_fail; 2622 goto out_fail;
@@ -2764,7 +2764,7 @@ out:
2764} 2764}
2765 2765
2766int 2766int
2767get_dfs_path(int xid, struct cifs_ses *ses, const char *old_path, 2767get_dfs_path(unsigned int xid, struct cifs_ses *ses, const char *old_path,
2768 const struct nls_table *nls_codepage, unsigned int *num_referrals, 2768 const struct nls_table *nls_codepage, unsigned int *num_referrals,
2769 struct dfs_info3_param **referrals, int remap) 2769 struct dfs_info3_param **referrals, int remap)
2770{ 2770{
@@ -3067,7 +3067,7 @@ ip_connect(struct TCP_Server_Info *server)
3067 return generic_ip_connect(server); 3067 return generic_ip_connect(server);
3068} 3068}
3069 3069
3070void reset_cifs_unix_caps(int xid, struct cifs_tcon *tcon, 3070void reset_cifs_unix_caps(unsigned int xid, struct cifs_tcon *tcon,
3071 struct cifs_sb_info *cifs_sb, struct smb_vol *vol_info) 3071 struct cifs_sb_info *cifs_sb, struct smb_vol *vol_info)
3072{ 3072{
3073 /* if we are reconnecting then should we check to see if 3073 /* if we are reconnecting then should we check to see if
@@ -3399,7 +3399,7 @@ cifs_negotiate_rsize(struct cifs_tcon *tcon, struct smb_vol *pvolume_info)
3399} 3399}
3400 3400
3401static int 3401static int
3402is_path_accessible(int xid, struct cifs_tcon *tcon, 3402is_path_accessible(unsigned int xid, struct cifs_tcon *tcon,
3403 struct cifs_sb_info *cifs_sb, const char *full_path) 3403 struct cifs_sb_info *cifs_sb, const char *full_path)
3404{ 3404{
3405 int rc; 3405 int rc;
@@ -3485,7 +3485,7 @@ build_unc_path_to_root(const struct smb_vol *vol,
3485 * determine whether there were referrals. 3485 * determine whether there were referrals.
3486 */ 3486 */
3487static int 3487static int
3488expand_dfs_referral(int xid, struct cifs_ses *pSesInfo, 3488expand_dfs_referral(unsigned int xid, struct cifs_ses *pSesInfo,
3489 struct smb_vol *volume_info, struct cifs_sb_info *cifs_sb, 3489 struct smb_vol *volume_info, struct cifs_sb_info *cifs_sb,
3490 int check_prefix) 3490 int check_prefix)
3491{ 3491{
@@ -3595,7 +3595,7 @@ int
3595cifs_mount(struct cifs_sb_info *cifs_sb, struct smb_vol *volume_info) 3595cifs_mount(struct cifs_sb_info *cifs_sb, struct smb_vol *volume_info)
3596{ 3596{
3597 int rc; 3597 int rc;
3598 int xid; 3598 unsigned int xid;
3599 struct cifs_ses *pSesInfo; 3599 struct cifs_ses *pSesInfo;
3600 struct cifs_tcon *tcon; 3600 struct cifs_tcon *tcon;
3601 struct TCP_Server_Info *srvTcp; 3601 struct TCP_Server_Info *srvTcp;
@@ -3618,7 +3618,7 @@ try_mount_again:
3618 else if (pSesInfo) 3618 else if (pSesInfo)
3619 cifs_put_smb_ses(pSesInfo); 3619 cifs_put_smb_ses(pSesInfo);
3620 3620
3621 FreeXid(xid); 3621 free_xid(xid);
3622 } 3622 }
3623#endif 3623#endif
3624 rc = 0; 3624 rc = 0;
@@ -3628,7 +3628,7 @@ try_mount_again:
3628 full_path = NULL; 3628 full_path = NULL;
3629 tlink = NULL; 3629 tlink = NULL;
3630 3630
3631 xid = GetXid(); 3631 xid = get_xid();
3632 3632
3633 /* get a reference to a tcp session */ 3633 /* get a reference to a tcp session */
3634 srvTcp = cifs_get_tcp_session(volume_info); 3634 srvTcp = cifs_get_tcp_session(volume_info);
@@ -3781,7 +3781,7 @@ mount_fail_check:
3781 } 3781 }
3782 3782
3783out: 3783out:
3784 FreeXid(xid); 3784 free_xid(xid);
3785 return rc; 3785 return rc;
3786} 3786}
3787 3787