Lines Matching defs: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);
965 cifs_setup_request(struct cifs_ses *ses, struct TCP_Server_Info *ignored,
976 rc = allocate_mid(ses, hdr, &mid);
979 rc = cifs_sign_rqst(rqst, ses->server, &mid->sequence_number);
1017 * Return a channel (master if none) of @ses that can be used to send
1023 struct TCP_Server_Info *cifs_pick_channel(struct cifs_ses *ses)
1030 if (!ses)
1033 spin_lock(&ses->chan_lock);
1034 for (i = 0; i < ses->chan_count; i++) {
1035 server = ses->chans[i].server;
1039 if (CIFS_CHAN_NEEDS_RECONNECT(ses, i))
1060 index = (uint)atomic_inc_return(&ses->chan_seq);
1061 index %= ses->chan_count;
1064 server = ses->chans[index].server;
1065 spin_unlock(&ses->chan_lock);
1071 compound_send_recv(const unsigned int xid, struct cifs_ses *ses,
1090 if (!ses || !ses->server || !server) {
1143 midQ[i] = server->ops->setup_request(ses, server, &rqst[i]);
1201 spin_lock(&ses->ses_lock);
1202 if ((ses->ses_status == SES_NEW) || (optype & CIFS_NEG_OP) || (optype & CIFS_SESS_OP)) {
1203 spin_unlock(&ses->ses_lock);
1206 smb311_update_preauth_hash(ses, server, rqst[0].rq_iov, rqst[0].rq_nvec);
1209 spin_lock(&ses->ses_lock);
1211 spin_unlock(&ses->ses_lock);
1275 spin_lock(&ses->ses_lock);
1276 if ((ses->ses_status == SES_NEW) || (optype & CIFS_NEG_OP) || (optype & CIFS_SESS_OP)) {
1281 spin_unlock(&ses->ses_lock);
1283 smb311_update_preauth_hash(ses, server, &iov, 1);
1285 spin_lock(&ses->ses_lock);
1287 spin_unlock(&ses->ses_lock);
1305 cifs_send_recv(const unsigned int xid, struct cifs_ses *ses,
1310 return compound_send_recv(xid, ses, server, flags, 1,
1315 SendReceive2(const unsigned int xid, struct cifs_ses *ses,
1346 rc = cifs_send_recv(xid, ses, ses->server,
1354 SendReceive(const unsigned int xid, struct cifs_ses *ses,
1366 if (ses == NULL) {
1370 server = ses->server;
1385 use ses->maxReq */
1403 rc = allocate_mid(ses, in_buf, &midQ);
1477 struct cifs_ses *ses = tcon->ses;
1487 pSMB->hdr.Mid = get_next_mid(ses->server);
1489 return SendReceive(xid, ses, in_buf, out_buf,
1501 struct cifs_ses *ses;
1508 if (tcon == NULL || tcon->ses == NULL) {
1512 ses = tcon->ses;
1513 server = ses->server;
1529 use ses->maxReq */
1547 rc = allocate_mid(ses, in_buf, &midQ);