Lines Matching refs:ses
119 struct cifs_ses *ses; in cifs_reconnect_tcon() local
131 ses = tcon->ses; in cifs_reconnect_tcon()
132 server = ses->server; in cifs_reconnect_tcon()
171 if (!ses->need_reconnect && !tcon->need_reconnect) in cifs_reconnect_tcon()
180 mutex_lock(&ses->session_mutex); in cifs_reconnect_tcon()
181 rc = cifs_negotiate_protocol(0, ses); in cifs_reconnect_tcon()
182 if (rc == 0 && ses->need_reconnect) in cifs_reconnect_tcon()
183 rc = cifs_setup_session(0, ses, nls_codepage); in cifs_reconnect_tcon()
187 mutex_unlock(&ses->session_mutex); in cifs_reconnect_tcon()
192 rc = CIFSTCon(0, ses, tcon->treeName, tcon, nls_codepage); in cifs_reconnect_tcon()
193 mutex_unlock(&ses->session_mutex); in cifs_reconnect_tcon()
202 if (ses->capabilities & CAP_UNIX) in cifs_reconnect_tcon()
260 struct cifs_ses *ses, void **request_buf) in small_smb_init_no_tc() argument
270 buffer->Mid = get_next_mid(ses->server); in small_smb_init_no_tc()
271 if (ses->capabilities & CAP_UNICODE) in small_smb_init_no_tc()
273 if (ses->capabilities & CAP_STATUS32) in small_smb_init_no_tc()
328 if (tcon->ses->need_reconnect || tcon->need_reconnect) in smb_init_no_reconnect()
367 decode_ext_sec_blob(struct cifs_ses *ses, NEGOTIATE_RSP *pSMBr) in decode_ext_sec_blob() argument
372 struct TCP_Server_Info *server = ses->server; in decode_ext_sec_blob()
545 CIFSSMBNegotiate(const unsigned int xid, struct cifs_ses *ses) in CIFSSMBNegotiate() argument
552 struct TCP_Server_Info *server = ses->server; in CIFSSMBNegotiate()
568 if (should_set_ext_sec_flag(ses->sectype)) { in CIFSSMBNegotiate()
582 rc = SendReceive(xid, ses, (struct smb_hdr *) pSMB, in CIFSSMBNegotiate()
619 cifs_dbg(NOISY, "Max buf = %d\n", ses->server->maxBuf); in CIFSSMBNegotiate()
626 memcpy(ses->server->cryptkey, pSMBr->u.EncryptionKey, in CIFSSMBNegotiate()
631 rc = decode_ext_sec_blob(ses, pSMBr); in CIFSSMBNegotiate()
641 rc = cifs_enable_signing(server, ses->sign); in CIFSSMBNegotiate()
658 if ((tcon->ses == NULL) || (tcon->ses->server == NULL)) in CIFSSMBTDis()
667 if ((tcon->need_reconnect) || (tcon->ses->need_reconnect)) in CIFSSMBTDis()
675 rc = SendReceiveNoRsp(xid, tcon->ses, (char *)smb_buffer, 0); in CIFSSMBTDis()
741 CIFSSMBLogoff(const unsigned int xid, struct cifs_ses *ses) in CIFSSMBLogoff() argument
753 if (!ses || !ses->server) in CIFSSMBLogoff()
756 mutex_lock(&ses->session_mutex); in CIFSSMBLogoff()
757 if (ses->need_reconnect) in CIFSSMBLogoff()
762 mutex_unlock(&ses->session_mutex); in CIFSSMBLogoff()
766 pSMB->hdr.Mid = get_next_mid(ses->server); in CIFSSMBLogoff()
768 if (ses->server->sign) in CIFSSMBLogoff()
771 pSMB->hdr.Uid = ses->Suid; in CIFSSMBLogoff()
774 rc = SendReceiveNoRsp(xid, ses, (char *) pSMB, 0); in CIFSSMBLogoff()
776 mutex_unlock(&ses->session_mutex); in CIFSSMBLogoff()
848 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSPOSIXDelFile()
895 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBDelFile()
941 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBRmDir()
986 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBMkDir()
1065 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSPOSIXCreate()
1232 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in SMBLegacyOpen()
1341 if (tcon->ses->capabilities & CAP_UNIX) in CIFS_open()
1359 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *)req, in CIFS_open()
1549 struct TCP_Server_Info *server = tcon->ses->server; in cifs_readv_callback()
1612 if (tcon->ses->capabilities & CAP_LARGE_FILES) in cifs_async_readv()
1651 rc = cifs_call_async(tcon->ses->server, &rqst, cifs_readv_receive, in cifs_async_readv()
1681 if (tcon->ses->capabilities & CAP_LARGE_FILES) in CIFSSMBRead()
1700 if (tcon->ses->server == NULL) in CIFSSMBRead()
1723 rc = SendReceive2(xid, tcon->ses, iov, 1 /* num iovecs */, in CIFSSMBRead()
1792 if (tcon->ses == NULL) in CIFSSMBWrite()
1795 if (tcon->ses->capabilities & CAP_LARGE_FILES) in CIFSSMBWrite()
1814 if (tcon->ses->server == NULL) in CIFSSMBWrite()
1831 if (tcon->ses->capabilities & CAP_LARGE_WRITE_X) { in CIFSSMBWrite()
1834 bytes_sent = (tcon->ses->server->maxBuf - MAX_CIFS_HDR_SIZE) in CIFSSMBWrite()
1872 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBWrite()
1923 server = tlink_tcon(wdata->cfile->tlink)->ses->server; in cifs_writev_requeue()
2054 struct TCP_Server_Info *server = tcon->ses->server; in cifs_writev_callback()
2060 wdata->result = cifs_check_receive(mid, tcon->ses->server, 0); in cifs_writev_callback()
2094 add_credits(tcon->ses->server, 1, 0); in cifs_writev_callback()
2109 if (tcon->ses->capabilities & CAP_LARGE_FILES) { in cifs_async_writev()
2168 rc = cifs_call_async(tcon->ses->server, &rqst, NULL, in cifs_async_writev()
2200 if (tcon->ses->capabilities & CAP_LARGE_FILES) { in CIFSSMBWrite2()
2217 if (tcon->ses->server == NULL) in CIFSSMBWrite2()
2254 rc = SendReceive2(xid, tcon->ses, iov, n_vec + 1, &resp_buf_type, 0); in CIFSSMBWrite2()
2320 rc = SendReceive2(xid, tcon->ses, iov, 2, &resp_buf_type, CIFS_NO_RESP); in cifs_lockv()
2386 rc = SendReceiveNoRsp(xid, tcon->ses, (char *)pSMB, flags); in CIFSSMBLock()
2474 rc = SendReceive2(xid, tcon->ses, iov, 1 /* num iovecs */, in CIFSSMBPosixLock()
2548 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSSMBClose()
2577 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSSMBFlush()
2641 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBRename()
2722 rc = SendReceive(xid, pTcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBRenameOpenFile()
2791 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBCopy()
2880 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSUnixCreateSymLink()
2967 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSUnixCreateHardLink()
3042 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSCreateHardLink()
3114 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBUnixQuerySymLink()
3202 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQuerySymLink()
3322 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMB_set_compression()
3542 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBGetPosixACL()
3635 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBSetPosixACL()
3694 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSGetExtAttr()
3853 rc = SendReceive2(xid, tcon->ses, iov, 1 /* num iovec */, &buf_type, in CIFSSMBGetCIFSACL()
3959 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBSetCIFSACL()
4013 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in SMBQueryInformation()
4088 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQFileInfo()
4175 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQPathInfo()
4257 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBUnixQFileInfo()
4341 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBUnixQPathInfo()
4459 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSFindFirst()
4587 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSFindNext()
4676 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSFindClose()
4748 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSGetSrvInodeNumber()
4894 CIFSGetDFSRefer(const unsigned int xid, struct cifs_ses *ses, in CIFSGetDFSRefer() argument
4910 if (ses == NULL) in CIFSGetDFSRefer()
4920 pSMB->hdr.Mid = get_next_mid(ses->server); in CIFSGetDFSRefer()
4921 pSMB->hdr.Tid = ses->ipc_tid; in CIFSGetDFSRefer()
4922 pSMB->hdr.Uid = ses->Suid; in CIFSGetDFSRefer()
4923 if (ses->capabilities & CAP_STATUS32) in CIFSGetDFSRefer()
4925 if (ses->capabilities & CAP_DFS) in CIFSGetDFSRefer()
4928 if (ses->capabilities & CAP_UNICODE) { in CIFSGetDFSRefer()
4942 if (ses->server->sign) in CIFSGetDFSRefer()
4945 pSMB->hdr.Uid = ses->Suid; in CIFSGetDFSRefer()
4971 rc = SendReceive(xid, ses, (struct smb_hdr *) pSMB, in CIFSGetDFSRefer()
5045 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in SMBOldQFSInfo()
5125 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQFSInfo()
5205 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQFSAttributeInfo()
5276 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQFSDeviceInfo()
5346 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQFSUnixInfo()
5429 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBSetFSUnixInfo()
5491 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQFSPosixInfo()
5587 if (tcon->ses->capabilities & CAP_INFOLEVEL_PASSTHRU) in CIFSSMBSetEOF()
5594 if (tcon->ses->capabilities & CAP_INFOLEVEL_PASSTHRU) in CIFSSMBSetEOF()
5619 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBSetEOF()
5680 if (tcon->ses->capabilities & CAP_INFOLEVEL_PASSTHRU) in CIFSSMBSetFileSize()
5687 if (tcon->ses->capabilities & CAP_INFOLEVEL_PASSTHRU) in CIFSSMBSetFileSize()
5697 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSSMBSetFileSize()
5760 if (tcon->ses->capabilities & CAP_INFOLEVEL_PASSTHRU) in CIFSSMBSetFileInfo()
5768 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSSMBSetFileInfo()
5828 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSSMBSetFileDisposition()
5893 if (tcon->ses->capabilities & CAP_INFOLEVEL_PASSTHRU) in CIFSSMBSetPathInfo()
5901 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBSetPathInfo()
5952 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
6067 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSSMBUnixSetFileInfo()
6145 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBUnixSetPathInfo()
6229 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQAllEAs()
6445 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBSetEA()
6516 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBNotify()