Lines Matching refs:ses
703 static int allocate_mid(struct cifs_ses *ses, struct smb_hdr *in_buf,
706 spin_lock(&ses->ses_lock);
707 if (ses->ses_status == SES_NEW) {
710 spin_unlock(&ses->ses_lock);
716 if (ses->ses_status == SES_EXITING) {
719 spin_unlock(&ses->ses_lock);
724 spin_unlock(&ses->ses_lock);
726 *ppmidQ = alloc_mid(in_buf, ses->server);
729 spin_lock(&ses->server->mid_lock);
730 list_add_tail(&(*ppmidQ)->qhead, &ses->server->pending_mid_q);
731 spin_unlock(&ses->server->mid_lock);
868 SendReceiveNoRsp(const unsigned int xid, struct cifs_ses *ses,
879 rc = SendReceive2(xid, ses, iov, 1, &resp_buf_type, flags, &rsp_iov);
962 cifs_setup_request(struct cifs_ses *ses, struct TCP_Server_Info *ignored,
973 rc = allocate_mid(ses, hdr, &mid);
976 rc = cifs_sign_rqst(rqst, ses->server, &mid->sequence_number);
1014 * Return a channel (master if none) of @ses that can be used to send
1020 struct TCP_Server_Info *cifs_pick_channel(struct cifs_ses *ses)
1027 if (!ses)
1030 spin_lock(&ses->chan_lock);
1031 for (i = 0; i < ses->chan_count; i++) {
1032 server = ses->chans[i].server;
1036 if (CIFS_CHAN_NEEDS_RECONNECT(ses, i))
1057 index = (uint)atomic_inc_return(&ses->chan_seq);
1058 index %= ses->chan_count;
1060 spin_unlock(&ses->chan_lock);
1062 return ses->chans[index].server;
1066 compound_send_recv(const unsigned int xid, struct cifs_ses *ses,
1085 if (!ses || !ses->server || !server) {
1138 midQ[i] = server->ops->setup_request(ses, server, &rqst[i]);
1196 spin_lock(&ses->ses_lock);
1197 if ((ses->ses_status == SES_NEW) || (optype & CIFS_NEG_OP) || (optype & CIFS_SESS_OP)) {
1198 spin_unlock(&ses->ses_lock);
1201 smb311_update_preauth_hash(ses, server, rqst[0].rq_iov, rqst[0].rq_nvec);
1204 spin_lock(&ses->ses_lock);
1206 spin_unlock(&ses->ses_lock);
1270 spin_lock(&ses->ses_lock);
1271 if ((ses->ses_status == SES_NEW) || (optype & CIFS_NEG_OP) || (optype & CIFS_SESS_OP)) {
1276 spin_unlock(&ses->ses_lock);
1278 smb311_update_preauth_hash(ses, server, &iov, 1);
1280 spin_lock(&ses->ses_lock);
1282 spin_unlock(&ses->ses_lock);
1300 cifs_send_recv(const unsigned int xid, struct cifs_ses *ses,
1305 return compound_send_recv(xid, ses, server, flags, 1,
1310 SendReceive2(const unsigned int xid, struct cifs_ses *ses,
1341 rc = cifs_send_recv(xid, ses, ses->server,
1349 SendReceive(const unsigned int xid, struct cifs_ses *ses,
1361 if (ses == NULL) {
1365 server = ses->server;
1380 use ses->maxReq */
1398 rc = allocate_mid(ses, in_buf, &midQ);
1472 struct cifs_ses *ses = tcon->ses;
1482 pSMB->hdr.Mid = get_next_mid(ses->server);
1484 return SendReceive(xid, ses, in_buf, out_buf,
1496 struct cifs_ses *ses;
1503 if (tcon == NULL || tcon->ses == NULL) {
1507 ses = tcon->ses;
1508 server = ses->server;
1524 use ses->maxReq */
1542 rc = allocate_mid(ses, in_buf, &midQ);