Lines Matching refs:ses
74 struct cifs_ses *ses; in cifs_reconnect_tcon() local
85 ses = tcon->ses; in cifs_reconnect_tcon()
86 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()
115 mutex_lock(&ses->session_mutex); in cifs_reconnect_tcon()
124 mutex_unlock(&ses->session_mutex); in cifs_reconnect_tcon()
128 mutex_unlock(&ses->session_mutex); in cifs_reconnect_tcon()
141 spin_lock(&ses->ses_lock); in cifs_reconnect_tcon()
142 spin_lock(&ses->chan_lock); in cifs_reconnect_tcon()
143 if (!cifs_chan_needs_reconnect(ses, server) && in cifs_reconnect_tcon()
144 ses->ses_status == SES_GOOD) { in cifs_reconnect_tcon()
145 spin_unlock(&ses->chan_lock); in cifs_reconnect_tcon()
146 spin_unlock(&ses->ses_lock); in cifs_reconnect_tcon()
152 mutex_unlock(&ses->session_mutex); in cifs_reconnect_tcon()
155 spin_unlock(&ses->chan_lock); in cifs_reconnect_tcon()
156 spin_unlock(&ses->ses_lock); in cifs_reconnect_tcon()
158 rc = cifs_negotiate_protocol(0, ses, server); in cifs_reconnect_tcon()
160 mutex_unlock(&ses->session_mutex); in cifs_reconnect_tcon()
165 rc = cifs_setup_session(0, ses, server, ses->local_nls); in cifs_reconnect_tcon()
171 if (ses->password2) in cifs_reconnect_tcon()
172 swap(ses->password2, ses->password); in cifs_reconnect_tcon()
177 mutex_unlock(&ses->session_mutex); in cifs_reconnect_tcon()
184 mutex_unlock(&ses->session_mutex); in cifs_reconnect_tcon()
195 if (cap_unix(ses)) in cifs_reconnect_tcon()
252 struct cifs_ses *ses, void **request_buf) in small_smb_init_no_tc() argument
262 buffer->Mid = get_next_mid(ses->server); in small_smb_init_no_tc()
263 if (ses->capabilities & CAP_UNICODE) in small_smb_init_no_tc()
265 if (ses->capabilities & CAP_STATUS32) in small_smb_init_no_tc()
320 spin_lock(&tcon->ses->chan_lock); in smb_init_no_reconnect()
321 if (cifs_chan_needs_reconnect(tcon->ses, tcon->ses->server) || in smb_init_no_reconnect()
323 spin_unlock(&tcon->ses->chan_lock); in smb_init_no_reconnect()
326 spin_unlock(&tcon->ses->chan_lock); in smb_init_no_reconnect()
364 decode_ext_sec_blob(struct cifs_ses *ses, NEGOTIATE_RSP *pSMBr) in decode_ext_sec_blob() argument
369 struct TCP_Server_Info *server = ses->server; in decode_ext_sec_blob()
419 struct cifs_ses *ses, in CIFSSMBNegotiate() argument
442 if (ses->unicode != 0) in CIFSSMBNegotiate()
445 if (should_set_ext_sec_flag(ses->sectype)) { in CIFSSMBNegotiate()
464 rc = SendReceive(xid, ses, (struct smb_hdr *) pSMB, in CIFSSMBNegotiate()
499 cifs_dbg(NOISY, "Max buf = %d\n", ses->server->maxBuf); in CIFSSMBNegotiate()
507 memcpy(ses->server->cryptkey, pSMBr->u.EncryptionKey, in CIFSSMBNegotiate()
512 rc = decode_ext_sec_blob(ses, pSMBr); in CIFSSMBNegotiate()
521 rc = cifs_enable_signing(server, ses->sign); in CIFSSMBNegotiate()
538 if ((tcon->ses == NULL) || (tcon->ses->server == NULL)) in CIFSSMBTDis()
547 spin_lock(&tcon->ses->chan_lock); in CIFSSMBTDis()
548 if ((tcon->need_reconnect) || CIFS_ALL_CHANS_NEED_RECONNECT(tcon->ses)) { in CIFSSMBTDis()
549 spin_unlock(&tcon->ses->chan_lock); in CIFSSMBTDis()
552 spin_unlock(&tcon->ses->chan_lock); in CIFSSMBTDis()
559 rc = SendReceiveNoRsp(xid, tcon->ses, (char *)smb_buffer, 0); in CIFSSMBTDis()
631 CIFSSMBLogoff(const unsigned int xid, struct cifs_ses *ses) in CIFSSMBLogoff() argument
643 if (!ses || !ses->server) in CIFSSMBLogoff()
646 mutex_lock(&ses->session_mutex); in CIFSSMBLogoff()
647 spin_lock(&ses->chan_lock); in CIFSSMBLogoff()
648 if (CIFS_ALL_CHANS_NEED_RECONNECT(ses)) { in CIFSSMBLogoff()
649 spin_unlock(&ses->chan_lock); in CIFSSMBLogoff()
653 spin_unlock(&ses->chan_lock); in CIFSSMBLogoff()
657 mutex_unlock(&ses->session_mutex); in CIFSSMBLogoff()
661 pSMB->hdr.Mid = get_next_mid(ses->server); in CIFSSMBLogoff()
663 if (ses->server->sign) in CIFSSMBLogoff()
666 pSMB->hdr.Uid = ses->Suid; in CIFSSMBLogoff()
669 rc = SendReceiveNoRsp(xid, ses, (char *) pSMB, 0); in CIFSSMBLogoff()
672 mutex_unlock(&ses->session_mutex); in CIFSSMBLogoff()
745 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSPOSIXDelFile()
790 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBDelFile()
834 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBRmDir()
878 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBMkDir()
956 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSPOSIXCreate()
1136 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in SMBLegacyOpen()
1242 if (tcon->ses->capabilities & CAP_UNIX) in CIFS_open()
1260 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *)req, in CIFS_open()
1304 struct TCP_Server_Info *server = tcon->ses->server; in cifs_readv_callback()
1400 if (tcon->ses->capabilities & CAP_LARGE_FILES) in cifs_async_readv()
1440 rc = cifs_call_async(tcon->ses->server, &rqst, cifs_readv_receive, in cifs_async_readv()
1468 if (tcon->ses->capabilities & CAP_LARGE_FILES) in CIFSSMBRead()
1487 if (tcon->ses->server == NULL) in CIFSSMBRead()
1510 rc = SendReceive2(xid, tcon->ses, iov, 1, &resp_buf_type, in CIFSSMBRead()
1578 if (tcon->ses == NULL) in CIFSSMBWrite()
1581 if (tcon->ses->capabilities & CAP_LARGE_FILES) in CIFSSMBWrite()
1600 if (tcon->ses->server == NULL) in CIFSSMBWrite()
1617 if (tcon->ses->capabilities & CAP_LARGE_WRITE_X) { in CIFSSMBWrite()
1620 bytes_sent = (tcon->ses->server->maxBuf - MAX_CIFS_HDR_SIZE) in CIFSSMBWrite()
1653 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBWrite()
1702 result = cifs_check_receive(mid, tcon->ses->server, 0); in cifs_writev_callback()
1756 add_credits(tcon->ses->server, &credits, 0); in cifs_writev_callback()
1770 if (tcon->ses->capabilities & CAP_LARGE_FILES) { in cifs_async_writev()
1828 rc = cifs_call_async(tcon->ses->server, &rqst, NULL, in cifs_async_writev()
1863 if (tcon->ses->capabilities & CAP_LARGE_FILES) { in CIFSSMBWrite2()
1880 if (tcon->ses->server == NULL) in CIFSSMBWrite2()
1916 rc = SendReceive2(xid, tcon->ses, iov, n_vec + 1, &resp_buf_type, 0, in CIFSSMBWrite2()
1984 rc = SendReceive2(xid, tcon->ses, iov, 2, &resp_buf_type, in cifs_lockv()
2051 rc = SendReceiveNoRsp(xid, tcon->ses, (char *)pSMB, flags); in CIFSSMBLock()
2140 rc = SendReceive2(xid, tcon->ses, iov, 1 /* num iovecs */, in CIFSSMBPosixLock()
2211 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSSMBClose()
2241 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSSMBFlush()
2301 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBRename()
2383 rc = SendReceive(xid, pTcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBRenameOpenFile()
2470 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSUnixCreateSymLink()
2554 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSUnixCreateHardLink()
2625 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSCreateHardLink()
2695 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBUnixQuerySymLink()
2751 if (cap_unix(tcon->ses)) in cifs_query_reparse_point()
2796 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *)io_req, in cifs_query_reparse_point()
2960 rc = SendReceive2(xid, tcon->ses, in_iov, ARRAY_SIZE(in_iov), &buf_type, in cifs_create_reparse_inode()
3021 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMB_set_compression()
3271 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in cifs_do_get_acl()
3365 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in cifs_do_set_acl()
3440 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSGetExtAttr()
3598 rc = SendReceive2(xid, tcon->ses, iov, 1 /* num iovec */, &buf_type, in CIFSSMBGetCIFSACL()
3704 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBSetCIFSACL()
3755 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in SMBQueryInformation()
3830 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQFileInfo()
3915 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQPathInfo()
3997 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBUnixQFileInfo()
4079 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBUnixQPathInfo()
4207 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSFindFirst()
4325 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSFindNext()
4404 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSFindClose()
4475 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSGetSrvInodeNumber()
4510 CIFSGetDFSRefer(const unsigned int xid, struct cifs_ses *ses, in CIFSGetDFSRefer() argument
4526 if (ses == NULL || ses->tcon_ipc == NULL) in CIFSGetDFSRefer()
4535 rc = smb_init(SMB_COM_TRANSACTION2, 15, ses->tcon_ipc, in CIFSGetDFSRefer()
4542 pSMB->hdr.Mid = get_next_mid(ses->server); in CIFSGetDFSRefer()
4543 pSMB->hdr.Tid = ses->tcon_ipc->tid; in CIFSGetDFSRefer()
4544 pSMB->hdr.Uid = ses->Suid; in CIFSGetDFSRefer()
4545 if (ses->capabilities & CAP_STATUS32) in CIFSGetDFSRefer()
4547 if (ses->capabilities & CAP_DFS) in CIFSGetDFSRefer()
4550 if (ses->capabilities & CAP_UNICODE) { in CIFSGetDFSRefer()
4562 if (ses->server->sign) in CIFSGetDFSRefer()
4565 pSMB->hdr.Uid = ses->Suid; in CIFSGetDFSRefer()
4591 rc = SendReceive(xid, ses, (struct smb_hdr *) pSMB, in CIFSGetDFSRefer()
4667 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in SMBOldQFSInfo()
4754 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQFSInfo()
4841 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQFSAttributeInfo()
4912 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQFSDeviceInfo()
4982 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQFSUnixInfo()
5065 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBSetFSUnixInfo()
5127 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQFSPosixInfo()
5228 if (tcon->ses->capabilities & CAP_INFOLEVEL_PASSTHRU) in CIFSSMBSetEOF()
5235 if (tcon->ses->capabilities & CAP_INFOLEVEL_PASSTHRU) in CIFSSMBSetEOF()
5260 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBSetEOF()
5321 if (tcon->ses->capabilities & CAP_INFOLEVEL_PASSTHRU) in CIFSSMBSetFileSize()
5328 if (tcon->ses->capabilities & CAP_INFOLEVEL_PASSTHRU) in CIFSSMBSetFileSize()
5338 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSSMBSetFileSize()
5395 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in SMBSetInformation()
5459 if (tcon->ses->capabilities & CAP_INFOLEVEL_PASSTHRU) in CIFSSMBSetFileInfo()
5467 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSSMBSetFileInfo()
5529 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSSMBSetFileDisposition()
5627 if (tcon->ses->capabilities & CAP_INFOLEVEL_PASSTHRU) in CIFSSMBSetPathInfo()
5635 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBSetPathInfo()
5753 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSSMBUnixSetFileInfo()
5829 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBUnixSetPathInfo()
5913 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQAllEAs()
6124 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBSetEA()