Lines Matching refs:ses

72 	struct cifs_ses *ses;  in cifs_reconnect_tcon()  local
84 ses = tcon->ses; in cifs_reconnect_tcon()
85 server = ses->server; in cifs_reconnect_tcon()
108 spin_lock(&ses->chan_lock); in cifs_reconnect_tcon()
109 if (!cifs_chan_needs_reconnect(ses, server) && !tcon->need_reconnect) { in cifs_reconnect_tcon()
110 spin_unlock(&ses->chan_lock); in cifs_reconnect_tcon()
113 spin_unlock(&ses->chan_lock); in cifs_reconnect_tcon()
134 spin_lock(&ses->chan_lock); in cifs_reconnect_tcon()
135 if (!cifs_chan_needs_reconnect(ses, server)) { in cifs_reconnect_tcon()
136 spin_unlock(&ses->chan_lock); in cifs_reconnect_tcon()
145 spin_unlock(&ses->chan_lock); in cifs_reconnect_tcon()
147 mutex_lock(&ses->session_mutex); in cifs_reconnect_tcon()
148 rc = cifs_negotiate_protocol(0, ses, server); in cifs_reconnect_tcon()
150 rc = cifs_setup_session(0, ses, server, nls_codepage); in cifs_reconnect_tcon()
154 mutex_unlock(&ses->session_mutex); in cifs_reconnect_tcon()
161 mutex_unlock(&ses->session_mutex); in cifs_reconnect_tcon()
172 if (cap_unix(ses)) in cifs_reconnect_tcon()
230 struct cifs_ses *ses, void **request_buf) in small_smb_init_no_tc() argument
240 buffer->Mid = get_next_mid(ses->server); in small_smb_init_no_tc()
241 if (ses->capabilities & CAP_UNICODE) in small_smb_init_no_tc()
243 if (ses->capabilities & CAP_STATUS32) in small_smb_init_no_tc()
298 spin_lock(&tcon->ses->chan_lock); in smb_init_no_reconnect()
299 if (cifs_chan_needs_reconnect(tcon->ses, tcon->ses->server) || in smb_init_no_reconnect()
301 spin_unlock(&tcon->ses->chan_lock); in smb_init_no_reconnect()
304 spin_unlock(&tcon->ses->chan_lock); in smb_init_no_reconnect()
342 decode_ext_sec_blob(struct cifs_ses *ses, NEGOTIATE_RSP *pSMBr) in decode_ext_sec_blob() argument
347 struct TCP_Server_Info *server = ses->server; in decode_ext_sec_blob()
397 struct cifs_ses *ses, in CIFSSMBNegotiate() argument
420 if (should_set_ext_sec_flag(ses->sectype)) { in CIFSSMBNegotiate()
439 rc = SendReceive(xid, ses, (struct smb_hdr *) pSMB, in CIFSSMBNegotiate()
474 cifs_dbg(NOISY, "Max buf = %d\n", ses->server->maxBuf); in CIFSSMBNegotiate()
481 memcpy(ses->server->cryptkey, pSMBr->u.EncryptionKey, in CIFSSMBNegotiate()
486 rc = decode_ext_sec_blob(ses, pSMBr); in CIFSSMBNegotiate()
495 rc = cifs_enable_signing(server, ses->sign); in CIFSSMBNegotiate()
512 if ((tcon->ses == NULL) || (tcon->ses->server == NULL)) in CIFSSMBTDis()
521 spin_lock(&tcon->ses->chan_lock); in CIFSSMBTDis()
522 if ((tcon->need_reconnect) || CIFS_ALL_CHANS_NEED_RECONNECT(tcon->ses)) { in CIFSSMBTDis()
523 spin_unlock(&tcon->ses->chan_lock); in CIFSSMBTDis()
526 spin_unlock(&tcon->ses->chan_lock); in CIFSSMBTDis()
533 rc = SendReceiveNoRsp(xid, tcon->ses, (char *)smb_buffer, 0); in CIFSSMBTDis()
605 CIFSSMBLogoff(const unsigned int xid, struct cifs_ses *ses) in CIFSSMBLogoff() argument
617 if (!ses || !ses->server) in CIFSSMBLogoff()
620 mutex_lock(&ses->session_mutex); in CIFSSMBLogoff()
621 spin_lock(&ses->chan_lock); in CIFSSMBLogoff()
622 if (CIFS_ALL_CHANS_NEED_RECONNECT(ses)) { in CIFSSMBLogoff()
623 spin_unlock(&ses->chan_lock); in CIFSSMBLogoff()
627 spin_unlock(&ses->chan_lock); in CIFSSMBLogoff()
631 mutex_unlock(&ses->session_mutex); in CIFSSMBLogoff()
635 pSMB->hdr.Mid = get_next_mid(ses->server); in CIFSSMBLogoff()
637 if (ses->server->sign) in CIFSSMBLogoff()
640 pSMB->hdr.Uid = ses->Suid; in CIFSSMBLogoff()
643 rc = SendReceiveNoRsp(xid, ses, (char *) pSMB, 0); in CIFSSMBLogoff()
646 mutex_unlock(&ses->session_mutex); in CIFSSMBLogoff()
719 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSPOSIXDelFile()
764 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBDelFile()
808 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBRmDir()
852 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBMkDir()
930 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSPOSIXCreate()
1094 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in SMBLegacyOpen()
1200 if (tcon->ses->capabilities & CAP_UNIX) in CIFS_open()
1218 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *)req, in CIFS_open()
1259 struct TCP_Server_Info *server = tcon->ses->server; in cifs_readv_callback()
1319 if (tcon->ses->capabilities & CAP_LARGE_FILES) in cifs_async_readv()
1360 rc = cifs_call_async(tcon->ses->server, &rqst, cifs_readv_receive, in cifs_async_readv()
1391 if (tcon->ses->capabilities & CAP_LARGE_FILES) in CIFSSMBRead()
1410 if (tcon->ses->server == NULL) in CIFSSMBRead()
1433 rc = SendReceive2(xid, tcon->ses, iov, 1, &resp_buf_type, in CIFSSMBRead()
1501 if (tcon->ses == NULL) in CIFSSMBWrite()
1504 if (tcon->ses->capabilities & CAP_LARGE_FILES) in CIFSSMBWrite()
1523 if (tcon->ses->server == NULL) in CIFSSMBWrite()
1540 if (tcon->ses->capabilities & CAP_LARGE_WRITE_X) { in CIFSSMBWrite()
1543 bytes_sent = (tcon->ses->server->maxBuf - MAX_CIFS_HDR_SIZE) in CIFSSMBWrite()
1576 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBWrite()
1618 wdata->result = cifs_check_receive(mid, tcon->ses->server, 0); in cifs_writev_callback()
1650 add_credits(tcon->ses->server, &credits, 0); in cifs_writev_callback()
1665 if (tcon->ses->capabilities & CAP_LARGE_FILES) { in cifs_async_writev()
1724 rc = cifs_call_async(tcon->ses->server, &rqst, NULL, in cifs_async_writev()
1757 if (tcon->ses->capabilities & CAP_LARGE_FILES) { in CIFSSMBWrite2()
1774 if (tcon->ses->server == NULL) in CIFSSMBWrite2()
1810 rc = SendReceive2(xid, tcon->ses, iov, n_vec + 1, &resp_buf_type, 0, in CIFSSMBWrite2()
1878 rc = SendReceive2(xid, tcon->ses, iov, 2, &resp_buf_type, in cifs_lockv()
1945 rc = SendReceiveNoRsp(xid, tcon->ses, (char *)pSMB, flags); in CIFSSMBLock()
2034 rc = SendReceive2(xid, tcon->ses, iov, 1 /* num iovecs */, in CIFSSMBPosixLock()
2105 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSSMBClose()
2135 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSSMBFlush()
2195 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBRename()
2277 rc = SendReceive(xid, pTcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBRenameOpenFile()
2341 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBCopy()
2427 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSUnixCreateSymLink()
2511 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSUnixCreateHardLink()
2581 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSCreateHardLink()
2651 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBUnixQuerySymLink()
2739 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQuerySymLink()
2859 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMB_set_compression()
3109 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in cifs_do_get_acl()
3203 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in cifs_do_set_acl()
3278 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSGetExtAttr()
3437 rc = SendReceive2(xid, tcon->ses, iov, 1 /* num iovec */, &buf_type, in CIFSSMBGetCIFSACL()
3543 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBSetCIFSACL()
3594 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in SMBQueryInformation()
3669 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQFileInfo()
3754 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQPathInfo()
3836 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBUnixQFileInfo()
3918 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBUnixQPathInfo()
4035 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSFindFirst()
4163 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSFindNext()
4252 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSFindClose()
4323 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSGetSrvInodeNumber()
4358 CIFSGetDFSRefer(const unsigned int xid, struct cifs_ses *ses, in CIFSGetDFSRefer() argument
4374 if (ses == NULL || ses->tcon_ipc == NULL) in CIFSGetDFSRefer()
4378 rc = smb_init(SMB_COM_TRANSACTION2, 15, ses->tcon_ipc, (void **) &pSMB, in CIFSGetDFSRefer()
4385 pSMB->hdr.Mid = get_next_mid(ses->server); in CIFSGetDFSRefer()
4386 pSMB->hdr.Tid = ses->tcon_ipc->tid; in CIFSGetDFSRefer()
4387 pSMB->hdr.Uid = ses->Suid; in CIFSGetDFSRefer()
4388 if (ses->capabilities & CAP_STATUS32) in CIFSGetDFSRefer()
4390 if (ses->capabilities & CAP_DFS) in CIFSGetDFSRefer()
4393 if (ses->capabilities & CAP_UNICODE) { in CIFSGetDFSRefer()
4405 if (ses->server->sign) in CIFSGetDFSRefer()
4408 pSMB->hdr.Uid = ses->Suid; in CIFSGetDFSRefer()
4434 rc = SendReceive(xid, ses, (struct smb_hdr *) pSMB, in CIFSGetDFSRefer()
4510 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in SMBOldQFSInfo()
4597 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQFSInfo()
4684 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQFSAttributeInfo()
4755 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQFSDeviceInfo()
4825 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQFSUnixInfo()
4908 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBSetFSUnixInfo()
4970 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQFSPosixInfo()
5071 if (tcon->ses->capabilities & CAP_INFOLEVEL_PASSTHRU) in CIFSSMBSetEOF()
5078 if (tcon->ses->capabilities & CAP_INFOLEVEL_PASSTHRU) in CIFSSMBSetEOF()
5103 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBSetEOF()
5164 if (tcon->ses->capabilities & CAP_INFOLEVEL_PASSTHRU) in CIFSSMBSetFileSize()
5171 if (tcon->ses->capabilities & CAP_INFOLEVEL_PASSTHRU) in CIFSSMBSetFileSize()
5181 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSSMBSetFileSize()
5245 if (tcon->ses->capabilities & CAP_INFOLEVEL_PASSTHRU) in CIFSSMBSetFileInfo()
5253 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSSMBSetFileInfo()
5315 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSSMBSetFileDisposition()
5413 if (tcon->ses->capabilities & CAP_INFOLEVEL_PASSTHRU) in CIFSSMBSetPathInfo()
5421 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBSetPathInfo()
5539 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSSMBUnixSetFileInfo()
5615 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBUnixSetPathInfo()
5699 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQAllEAs()
5912 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBSetEA()