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()
632 rc = decode_ext_sec_blob(ses, pSMBr); in CIFSSMBNegotiate()
642 rc = cifs_enable_signing(server, ses->sign); in CIFSSMBNegotiate()
659 if ((tcon->ses == NULL) || (tcon->ses->server == NULL)) in CIFSSMBTDis()
668 if ((tcon->need_reconnect) || (tcon->ses->need_reconnect)) in CIFSSMBTDis()
676 rc = SendReceiveNoRsp(xid, tcon->ses, (char *)smb_buffer, 0); in CIFSSMBTDis()
740 CIFSSMBLogoff(const unsigned int xid, struct cifs_ses *ses) in CIFSSMBLogoff() argument
752 if (!ses || !ses->server) in CIFSSMBLogoff()
755 mutex_lock(&ses->session_mutex); in CIFSSMBLogoff()
756 if (ses->need_reconnect) in CIFSSMBLogoff()
761 mutex_unlock(&ses->session_mutex); in CIFSSMBLogoff()
765 pSMB->hdr.Mid = get_next_mid(ses->server); in CIFSSMBLogoff()
767 if (ses->server->sign) in CIFSSMBLogoff()
770 pSMB->hdr.Uid = ses->Suid; in CIFSSMBLogoff()
773 rc = SendReceiveNoRsp(xid, ses, (char *) pSMB, 0); in CIFSSMBLogoff()
775 mutex_unlock(&ses->session_mutex); in CIFSSMBLogoff()
847 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSPOSIXDelFile()
894 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBDelFile()
940 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBRmDir()
985 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBMkDir()
1064 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSPOSIXCreate()
1231 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in SMBLegacyOpen()
1340 if (tcon->ses->capabilities & CAP_UNIX) in CIFS_open()
1358 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *)req, in CIFS_open()
1548 struct TCP_Server_Info *server = tcon->ses->server; in cifs_readv_callback()
1609 if (tcon->ses->capabilities & CAP_LARGE_FILES) in cifs_async_readv()
1648 rc = cifs_call_async(tcon->ses->server, &rqst, cifs_readv_receive, in cifs_async_readv()
1678 if (tcon->ses->capabilities & CAP_LARGE_FILES) in CIFSSMBRead()
1697 if (tcon->ses->server == NULL) in CIFSSMBRead()
1720 rc = SendReceive2(xid, tcon->ses, iov, 1 /* num iovecs */, in CIFSSMBRead()
1789 if (tcon->ses == NULL) in CIFSSMBWrite()
1792 if (tcon->ses->capabilities & CAP_LARGE_FILES) in CIFSSMBWrite()
1811 if (tcon->ses->server == NULL) in CIFSSMBWrite()
1828 if (tcon->ses->capabilities & CAP_LARGE_WRITE_X) { in CIFSSMBWrite()
1831 bytes_sent = (tcon->ses->server->maxBuf - MAX_CIFS_HDR_SIZE) in CIFSSMBWrite()
1869 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBWrite()
1920 server = tlink_tcon(wdata->cfile->tlink)->ses->server; in cifs_writev_requeue()
2056 wdata->result = cifs_check_receive(mid, tcon->ses->server, 0); in cifs_writev_callback()
2088 add_credits(tcon->ses->server, 1, 0); in cifs_writev_callback()
2103 if (tcon->ses->capabilities & CAP_LARGE_FILES) { in cifs_async_writev()
2162 rc = cifs_call_async(tcon->ses->server, &rqst, NULL, in cifs_async_writev()
2194 if (tcon->ses->capabilities & CAP_LARGE_FILES) { in CIFSSMBWrite2()
2211 if (tcon->ses->server == NULL) in CIFSSMBWrite2()
2248 rc = SendReceive2(xid, tcon->ses, iov, n_vec + 1, &resp_buf_type, 0); in CIFSSMBWrite2()
2314 rc = SendReceive2(xid, tcon->ses, iov, 2, &resp_buf_type, CIFS_NO_RESP); in cifs_lockv()
2380 rc = SendReceiveNoRsp(xid, tcon->ses, (char *)pSMB, flags); in CIFSSMBLock()
2468 rc = SendReceive2(xid, tcon->ses, iov, 1 /* num iovecs */, in CIFSSMBPosixLock()
2542 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSSMBClose()
2571 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSSMBFlush()
2635 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBRename()
2716 rc = SendReceive(xid, pTcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBRenameOpenFile()
2785 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBCopy()
2874 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSUnixCreateSymLink()
2961 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSUnixCreateHardLink()
3036 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSCreateHardLink()
3108 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBUnixQuerySymLink()
3196 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQuerySymLink()
3316 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMB_set_compression()
3536 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBGetPosixACL()
3629 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBSetPosixACL()
3688 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSGetExtAttr()
3847 rc = SendReceive2(xid, tcon->ses, iov, 1 /* num iovec */, &buf_type, in CIFSSMBGetCIFSACL()
3953 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBSetCIFSACL()
4007 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in SMBQueryInformation()
4082 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQFileInfo()
4169 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQPathInfo()
4251 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBUnixQFileInfo()
4335 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBUnixQPathInfo()
4453 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSFindFirst()
4581 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSFindNext()
4670 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSFindClose()
4742 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSGetSrvInodeNumber()
4888 CIFSGetDFSRefer(const unsigned int xid, struct cifs_ses *ses, in CIFSGetDFSRefer() argument
4904 if (ses == NULL) in CIFSGetDFSRefer()
4914 pSMB->hdr.Mid = get_next_mid(ses->server); in CIFSGetDFSRefer()
4915 pSMB->hdr.Tid = ses->ipc_tid; in CIFSGetDFSRefer()
4916 pSMB->hdr.Uid = ses->Suid; in CIFSGetDFSRefer()
4917 if (ses->capabilities & CAP_STATUS32) in CIFSGetDFSRefer()
4919 if (ses->capabilities & CAP_DFS) in CIFSGetDFSRefer()
4922 if (ses->capabilities & CAP_UNICODE) { in CIFSGetDFSRefer()
4936 if (ses->server->sign) in CIFSGetDFSRefer()
4939 pSMB->hdr.Uid = ses->Suid; in CIFSGetDFSRefer()
4965 rc = SendReceive(xid, ses, (struct smb_hdr *) pSMB, in CIFSGetDFSRefer()
5039 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in SMBOldQFSInfo()
5119 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQFSInfo()
5199 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQFSAttributeInfo()
5270 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQFSDeviceInfo()
5340 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQFSUnixInfo()
5423 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBSetFSUnixInfo()
5485 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQFSPosixInfo()
5581 if (tcon->ses->capabilities & CAP_INFOLEVEL_PASSTHRU) in CIFSSMBSetEOF()
5588 if (tcon->ses->capabilities & CAP_INFOLEVEL_PASSTHRU) in CIFSSMBSetEOF()
5613 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBSetEOF()
5674 if (tcon->ses->capabilities & CAP_INFOLEVEL_PASSTHRU) in CIFSSMBSetFileSize()
5681 if (tcon->ses->capabilities & CAP_INFOLEVEL_PASSTHRU) in CIFSSMBSetFileSize()
5691 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSSMBSetFileSize()
5754 if (tcon->ses->capabilities & CAP_INFOLEVEL_PASSTHRU) in CIFSSMBSetFileInfo()
5762 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSSMBSetFileInfo()
5822 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSSMBSetFileDisposition()
5887 if (tcon->ses->capabilities & CAP_INFOLEVEL_PASSTHRU) in CIFSSMBSetPathInfo()
5895 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBSetPathInfo()
5946 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
6061 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSSMBUnixSetFileInfo()
6139 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBUnixSetPathInfo()
6223 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQAllEAs()
6439 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBSetEA()
6510 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBNotify()