Lines Matching refs:ses
126 struct cifs_ses *ses; in cifs_reconnect_tcon() local
138 ses = tcon->ses; in cifs_reconnect_tcon()
139 server = ses->server; in cifs_reconnect_tcon()
184 if (!ses->need_reconnect && !tcon->need_reconnect) in cifs_reconnect_tcon()
193 mutex_lock(&ses->session_mutex); in cifs_reconnect_tcon()
202 mutex_unlock(&ses->session_mutex); in cifs_reconnect_tcon()
206 rc = cifs_negotiate_protocol(0, ses); in cifs_reconnect_tcon()
207 if (rc == 0 && ses->need_reconnect) in cifs_reconnect_tcon()
208 rc = cifs_setup_session(0, ses, nls_codepage); in cifs_reconnect_tcon()
212 mutex_unlock(&ses->session_mutex); in cifs_reconnect_tcon()
217 rc = CIFSTCon(0, ses, tcon->treeName, tcon, nls_codepage); in cifs_reconnect_tcon()
218 mutex_unlock(&ses->session_mutex); in cifs_reconnect_tcon()
229 if (ses->capabilities & CAP_UNIX) in cifs_reconnect_tcon()
287 struct cifs_ses *ses, void **request_buf) in small_smb_init_no_tc() argument
297 buffer->Mid = get_next_mid(ses->server); in small_smb_init_no_tc()
298 if (ses->capabilities & CAP_UNICODE) in small_smb_init_no_tc()
300 if (ses->capabilities & CAP_STATUS32) in small_smb_init_no_tc()
355 if (tcon->ses->need_reconnect || tcon->need_reconnect) in smb_init_no_reconnect()
394 decode_ext_sec_blob(struct cifs_ses *ses, NEGOTIATE_RSP *pSMBr) in decode_ext_sec_blob() argument
399 struct TCP_Server_Info *server = ses->server; in decode_ext_sec_blob()
575 CIFSSMBNegotiate(const unsigned int xid, struct cifs_ses *ses) in CIFSSMBNegotiate() argument
582 struct TCP_Server_Info *server = ses->server; in CIFSSMBNegotiate()
598 if (should_set_ext_sec_flag(ses->sectype)) { in CIFSSMBNegotiate()
617 rc = SendReceive(xid, ses, (struct smb_hdr *) pSMB, in CIFSSMBNegotiate()
654 cifs_dbg(NOISY, "Max buf = %d\n", ses->server->maxBuf); in CIFSSMBNegotiate()
661 memcpy(ses->server->cryptkey, pSMBr->u.EncryptionKey, in CIFSSMBNegotiate()
666 rc = decode_ext_sec_blob(ses, pSMBr); in CIFSSMBNegotiate()
676 rc = cifs_enable_signing(server, ses->sign); in CIFSSMBNegotiate()
693 if ((tcon->ses == NULL) || (tcon->ses->server == NULL)) in CIFSSMBTDis()
702 if ((tcon->need_reconnect) || (tcon->ses->need_reconnect)) in CIFSSMBTDis()
710 rc = SendReceiveNoRsp(xid, tcon->ses, (char *)smb_buffer, 0); in CIFSSMBTDis()
781 CIFSSMBLogoff(const unsigned int xid, struct cifs_ses *ses) in CIFSSMBLogoff() argument
793 if (!ses || !ses->server) in CIFSSMBLogoff()
796 mutex_lock(&ses->session_mutex); in CIFSSMBLogoff()
797 if (ses->need_reconnect) in CIFSSMBLogoff()
802 mutex_unlock(&ses->session_mutex); in CIFSSMBLogoff()
806 pSMB->hdr.Mid = get_next_mid(ses->server); in CIFSSMBLogoff()
808 if (ses->server->sign) in CIFSSMBLogoff()
811 pSMB->hdr.Uid = ses->Suid; in CIFSSMBLogoff()
814 rc = SendReceiveNoRsp(xid, ses, (char *) pSMB, 0); in CIFSSMBLogoff()
817 mutex_unlock(&ses->session_mutex); in CIFSSMBLogoff()
889 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSPOSIXDelFile()
936 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBDelFile()
982 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBRmDir()
1027 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBMkDir()
1106 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSPOSIXCreate()
1272 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in SMBLegacyOpen()
1381 if (tcon->ses->capabilities & CAP_UNIX) in CIFS_open()
1399 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *)req, in CIFS_open()
1606 struct TCP_Server_Info *server = tcon->ses->server; in cifs_readv_callback()
1667 if (tcon->ses->capabilities & CAP_LARGE_FILES) in cifs_async_readv()
1708 rc = cifs_call_async(tcon->ses->server, &rqst, cifs_readv_receive, in cifs_async_readv()
1739 if (tcon->ses->capabilities & CAP_LARGE_FILES) in CIFSSMBRead()
1758 if (tcon->ses->server == NULL) in CIFSSMBRead()
1781 rc = SendReceive2(xid, tcon->ses, iov, 1, &resp_buf_type, in CIFSSMBRead()
1849 if (tcon->ses == NULL) in CIFSSMBWrite()
1852 if (tcon->ses->capabilities & CAP_LARGE_FILES) in CIFSSMBWrite()
1871 if (tcon->ses->server == NULL) in CIFSSMBWrite()
1888 if (tcon->ses->capabilities & CAP_LARGE_WRITE_X) { in CIFSSMBWrite()
1891 bytes_sent = (tcon->ses->server->maxBuf - MAX_CIFS_HDR_SIZE) in CIFSSMBWrite()
1924 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBWrite()
1982 server = tlink_tcon(wdata->cfile->tlink)->ses->server; in cifs_writev_requeue()
2128 wdata->result = cifs_check_receive(mid, tcon->ses->server, 0); in cifs_writev_callback()
2160 add_credits(tcon->ses->server, 1, 0); in cifs_writev_callback()
2175 if (tcon->ses->capabilities & CAP_LARGE_FILES) { in cifs_async_writev()
2236 rc = cifs_call_async(tcon->ses->server, &rqst, NULL, in cifs_async_writev()
2269 if (tcon->ses->capabilities & CAP_LARGE_FILES) { in CIFSSMBWrite2()
2286 if (tcon->ses->server == NULL) in CIFSSMBWrite2()
2322 rc = SendReceive2(xid, tcon->ses, iov, n_vec + 1, &resp_buf_type, 0, in CIFSSMBWrite2()
2390 rc = SendReceive2(xid, tcon->ses, iov, 2, &resp_buf_type, CIFS_NO_RESP, in cifs_lockv()
2457 rc = SendReceiveNoRsp(xid, tcon->ses, (char *)pSMB, flags); in CIFSSMBLock()
2545 rc = SendReceive2(xid, tcon->ses, iov, 1 /* num iovecs */, in CIFSSMBPosixLock()
2615 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSSMBClose()
2645 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSSMBFlush()
2710 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBRename()
2791 rc = SendReceive(xid, pTcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBRenameOpenFile()
2860 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBCopy()
2949 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSUnixCreateSymLink()
3036 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSUnixCreateHardLink()
3111 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSCreateHardLink()
3183 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBUnixQuerySymLink()
3271 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQuerySymLink()
3391 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMB_set_compression()
3613 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBGetPosixACL()
3706 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBSetPosixACL()
3765 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSGetExtAttr()
3925 rc = SendReceive2(xid, tcon->ses, iov, 1 /* num iovec */, &buf_type, in CIFSSMBGetCIFSACL()
4031 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBSetCIFSACL()
4085 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in SMBQueryInformation()
4160 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQFileInfo()
4247 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQPathInfo()
4329 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBUnixQFileInfo()
4413 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBUnixQPathInfo()
4531 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSFindFirst()
4659 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSFindNext()
4748 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSFindClose()
4821 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSGetSrvInodeNumber()
4856 CIFSGetDFSRefer(const unsigned int xid, struct cifs_ses *ses, in CIFSGetDFSRefer() argument
4872 if (ses == NULL || ses->tcon_ipc == NULL) in CIFSGetDFSRefer()
4876 rc = smb_init(SMB_COM_TRANSACTION2, 15, ses->tcon_ipc, (void **) &pSMB, in CIFSGetDFSRefer()
4883 pSMB->hdr.Mid = get_next_mid(ses->server); in CIFSGetDFSRefer()
4884 pSMB->hdr.Tid = ses->tcon_ipc->tid; in CIFSGetDFSRefer()
4885 pSMB->hdr.Uid = ses->Suid; in CIFSGetDFSRefer()
4886 if (ses->capabilities & CAP_STATUS32) in CIFSGetDFSRefer()
4888 if (ses->capabilities & CAP_DFS) in CIFSGetDFSRefer()
4891 if (ses->capabilities & CAP_UNICODE) { in CIFSGetDFSRefer()
4905 if (ses->server->sign) in CIFSGetDFSRefer()
4908 pSMB->hdr.Uid = ses->Suid; in CIFSGetDFSRefer()
4934 rc = SendReceive(xid, ses, (struct smb_hdr *) pSMB, in CIFSGetDFSRefer()
5010 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in SMBOldQFSInfo()
5090 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQFSInfo()
5170 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQFSAttributeInfo()
5241 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQFSDeviceInfo()
5311 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQFSUnixInfo()
5394 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBSetFSUnixInfo()
5456 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQFSPosixInfo()
5552 if (tcon->ses->capabilities & CAP_INFOLEVEL_PASSTHRU) in CIFSSMBSetEOF()
5559 if (tcon->ses->capabilities & CAP_INFOLEVEL_PASSTHRU) in CIFSSMBSetEOF()
5584 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBSetEOF()
5645 if (tcon->ses->capabilities & CAP_INFOLEVEL_PASSTHRU) in CIFSSMBSetFileSize()
5652 if (tcon->ses->capabilities & CAP_INFOLEVEL_PASSTHRU) in CIFSSMBSetFileSize()
5662 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSSMBSetFileSize()
5726 if (tcon->ses->capabilities & CAP_INFOLEVEL_PASSTHRU) in CIFSSMBSetFileInfo()
5734 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSSMBSetFileInfo()
5795 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSSMBSetFileDisposition()
5861 if (tcon->ses->capabilities & CAP_INFOLEVEL_PASSTHRU) in CIFSSMBSetPathInfo()
5869 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBSetPathInfo()
5920 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
6035 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSSMBUnixSetFileInfo()
6114 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBUnixSetPathInfo()
6200 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQAllEAs()
6415 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBSetEA()
6486 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBNotify()