Lines Matching refs:ses
103 struct cifs_ses *ses; in cifs_reconnect_tcon() local
116 ses = tcon->ses; in cifs_reconnect_tcon()
117 server = ses->server; in cifs_reconnect_tcon()
169 if (!ses->need_reconnect && !tcon->need_reconnect) in cifs_reconnect_tcon()
178 mutex_lock(&ses->session_mutex); in cifs_reconnect_tcon()
187 mutex_unlock(&ses->session_mutex); in cifs_reconnect_tcon()
191 rc = cifs_negotiate_protocol(0, ses); in cifs_reconnect_tcon()
192 if (rc == 0 && ses->need_reconnect) in cifs_reconnect_tcon()
193 rc = cifs_setup_session(0, ses, nls_codepage); in cifs_reconnect_tcon()
197 mutex_unlock(&ses->session_mutex); in cifs_reconnect_tcon()
203 mutex_unlock(&ses->session_mutex); in cifs_reconnect_tcon()
214 if (cap_unix(ses)) in cifs_reconnect_tcon()
272 struct cifs_ses *ses, void **request_buf) in small_smb_init_no_tc() argument
282 buffer->Mid = get_next_mid(ses->server); in small_smb_init_no_tc()
283 if (ses->capabilities & CAP_UNICODE) in small_smb_init_no_tc()
285 if (ses->capabilities & CAP_STATUS32) in small_smb_init_no_tc()
340 if (tcon->ses->need_reconnect || tcon->need_reconnect) in smb_init_no_reconnect()
379 decode_ext_sec_blob(struct cifs_ses *ses, NEGOTIATE_RSP *pSMBr) in decode_ext_sec_blob() argument
384 struct TCP_Server_Info *server = ses->server; in decode_ext_sec_blob()
479 CIFSSMBNegotiate(const unsigned int xid, struct cifs_ses *ses) in CIFSSMBNegotiate() argument
486 struct TCP_Server_Info *server = ses->server; in CIFSSMBNegotiate()
502 if (should_set_ext_sec_flag(ses->sectype)) { in CIFSSMBNegotiate()
521 rc = SendReceive(xid, ses, (struct smb_hdr *) pSMB, in CIFSSMBNegotiate()
556 cifs_dbg(NOISY, "Max buf = %d\n", ses->server->maxBuf); in CIFSSMBNegotiate()
563 memcpy(ses->server->cryptkey, pSMBr->u.EncryptionKey, in CIFSSMBNegotiate()
568 rc = decode_ext_sec_blob(ses, pSMBr); in CIFSSMBNegotiate()
577 rc = cifs_enable_signing(server, ses->sign); in CIFSSMBNegotiate()
594 if ((tcon->ses == NULL) || (tcon->ses->server == NULL)) in CIFSSMBTDis()
603 if ((tcon->need_reconnect) || (tcon->ses->need_reconnect)) in CIFSSMBTDis()
611 rc = SendReceiveNoRsp(xid, tcon->ses, (char *)smb_buffer, 0); in CIFSSMBTDis()
683 CIFSSMBLogoff(const unsigned int xid, struct cifs_ses *ses) in CIFSSMBLogoff() argument
695 if (!ses || !ses->server) in CIFSSMBLogoff()
698 mutex_lock(&ses->session_mutex); in CIFSSMBLogoff()
699 if (ses->need_reconnect) in CIFSSMBLogoff()
704 mutex_unlock(&ses->session_mutex); in CIFSSMBLogoff()
708 pSMB->hdr.Mid = get_next_mid(ses->server); in CIFSSMBLogoff()
710 if (ses->server->sign) in CIFSSMBLogoff()
713 pSMB->hdr.Uid = ses->Suid; in CIFSSMBLogoff()
716 rc = SendReceiveNoRsp(xid, ses, (char *) pSMB, 0); in CIFSSMBLogoff()
719 mutex_unlock(&ses->session_mutex); in CIFSSMBLogoff()
792 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSPOSIXDelFile()
837 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBDelFile()
881 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBRmDir()
925 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBMkDir()
1003 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSPOSIXCreate()
1167 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in SMBLegacyOpen()
1273 if (tcon->ses->capabilities & CAP_UNIX) in CIFS_open()
1291 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *)req, in CIFS_open()
1510 struct TCP_Server_Info *server = tcon->ses->server; in cifs_readv_callback()
1573 if (tcon->ses->capabilities & CAP_LARGE_FILES) in cifs_async_readv()
1614 rc = cifs_call_async(tcon->ses->server, &rqst, cifs_readv_receive, in cifs_async_readv()
1645 if (tcon->ses->capabilities & CAP_LARGE_FILES) in CIFSSMBRead()
1664 if (tcon->ses->server == NULL) in CIFSSMBRead()
1687 rc = SendReceive2(xid, tcon->ses, iov, 1, &resp_buf_type, in CIFSSMBRead()
1755 if (tcon->ses == NULL) in CIFSSMBWrite()
1758 if (tcon->ses->capabilities & CAP_LARGE_FILES) in CIFSSMBWrite()
1777 if (tcon->ses->server == NULL) in CIFSSMBWrite()
1794 if (tcon->ses->capabilities & CAP_LARGE_WRITE_X) { in CIFSSMBWrite()
1797 bytes_sent = (tcon->ses->server->maxBuf - MAX_CIFS_HDR_SIZE) in CIFSSMBWrite()
1830 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBWrite()
1888 server = tlink_tcon(wdata->cfile->tlink)->ses->server; in cifs_writev_requeue()
2049 wdata->result = cifs_check_receive(mid, tcon->ses->server, 0); in cifs_writev_callback()
2081 add_credits(tcon->ses->server, &credits, 0); in cifs_writev_callback()
2096 if (tcon->ses->capabilities & CAP_LARGE_FILES) { in cifs_async_writev()
2158 rc = cifs_call_async(tcon->ses->server, &rqst, NULL, in cifs_async_writev()
2191 if (tcon->ses->capabilities & CAP_LARGE_FILES) { in CIFSSMBWrite2()
2208 if (tcon->ses->server == NULL) in CIFSSMBWrite2()
2244 rc = SendReceive2(xid, tcon->ses, iov, n_vec + 1, &resp_buf_type, 0, in CIFSSMBWrite2()
2312 rc = SendReceive2(xid, tcon->ses, iov, 2, &resp_buf_type, in cifs_lockv()
2379 rc = SendReceiveNoRsp(xid, tcon->ses, (char *)pSMB, flags); in CIFSSMBLock()
2468 rc = SendReceive2(xid, tcon->ses, iov, 1 /* num iovecs */, in CIFSSMBPosixLock()
2538 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSSMBClose()
2568 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSSMBFlush()
2628 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBRename()
2710 rc = SendReceive(xid, pTcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBRenameOpenFile()
2774 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBCopy()
2860 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSUnixCreateSymLink()
2944 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSUnixCreateHardLink()
3014 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSCreateHardLink()
3084 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBUnixQuerySymLink()
3172 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQuerySymLink()
3292 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMB_set_compression()
3504 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBGetPosixACL()
3595 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBSetPosixACL()
3654 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSGetExtAttr()
3813 rc = SendReceive2(xid, tcon->ses, iov, 1 /* num iovec */, &buf_type, in CIFSSMBGetCIFSACL()
3919 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBSetCIFSACL()
3970 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in SMBQueryInformation()
4045 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQFileInfo()
4130 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQPathInfo()
4212 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBUnixQFileInfo()
4294 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBUnixQPathInfo()
4411 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSFindFirst()
4539 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSFindNext()
4628 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSFindClose()
4699 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSGetSrvInodeNumber()
4734 CIFSGetDFSRefer(const unsigned int xid, struct cifs_ses *ses, in CIFSGetDFSRefer() argument
4750 if (ses == NULL || ses->tcon_ipc == NULL) in CIFSGetDFSRefer()
4754 rc = smb_init(SMB_COM_TRANSACTION2, 15, ses->tcon_ipc, (void **) &pSMB, in CIFSGetDFSRefer()
4761 pSMB->hdr.Mid = get_next_mid(ses->server); in CIFSGetDFSRefer()
4762 pSMB->hdr.Tid = ses->tcon_ipc->tid; in CIFSGetDFSRefer()
4763 pSMB->hdr.Uid = ses->Suid; in CIFSGetDFSRefer()
4764 if (ses->capabilities & CAP_STATUS32) in CIFSGetDFSRefer()
4766 if (ses->capabilities & CAP_DFS) in CIFSGetDFSRefer()
4769 if (ses->capabilities & CAP_UNICODE) { in CIFSGetDFSRefer()
4781 if (ses->server->sign) in CIFSGetDFSRefer()
4784 pSMB->hdr.Uid = ses->Suid; in CIFSGetDFSRefer()
4810 rc = SendReceive(xid, ses, (struct smb_hdr *) pSMB, in CIFSGetDFSRefer()
4886 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in SMBOldQFSInfo()
4973 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQFSInfo()
5060 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQFSAttributeInfo()
5131 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQFSDeviceInfo()
5201 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQFSUnixInfo()
5284 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBSetFSUnixInfo()
5346 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQFSPosixInfo()
5447 if (tcon->ses->capabilities & CAP_INFOLEVEL_PASSTHRU) in CIFSSMBSetEOF()
5454 if (tcon->ses->capabilities & CAP_INFOLEVEL_PASSTHRU) in CIFSSMBSetEOF()
5479 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBSetEOF()
5540 if (tcon->ses->capabilities & CAP_INFOLEVEL_PASSTHRU) in CIFSSMBSetFileSize()
5547 if (tcon->ses->capabilities & CAP_INFOLEVEL_PASSTHRU) in CIFSSMBSetFileSize()
5557 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSSMBSetFileSize()
5621 if (tcon->ses->capabilities & CAP_INFOLEVEL_PASSTHRU) in CIFSSMBSetFileInfo()
5629 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSSMBSetFileInfo()
5691 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSSMBSetFileDisposition()
5788 if (tcon->ses->capabilities & CAP_INFOLEVEL_PASSTHRU) in CIFSSMBSetPathInfo()
5796 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBSetPathInfo()
5914 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSSMBUnixSetFileInfo()
5990 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBUnixSetPathInfo()
6074 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQAllEAs()
6287 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBSetEA()