Lines Matching refs:rc
206 int rc = 0; in smb_send_kvec() local
240 rc = sock_sendmsg(ssocket, smb_msg); in smb_send_kvec()
241 if (rc == -EAGAIN) { in smb_send_kvec()
253 if (rc < 0) in smb_send_kvec()
254 return rc; in smb_send_kvec()
256 if (rc == 0) { in smb_send_kvec()
265 *sent += rc; in smb_send_kvec()
319 int rc = 0; in __smb_send_rqst() local
333 rc = -EAGAIN; in __smb_send_rqst()
335 rc = smbd_send(server, num_rqst, rqst); in __smb_send_rqst()
372 rc = smb_send_kvec(server, &smb_msg, &sent); in __smb_send_rqst()
373 if (rc < 0) in __smb_send_rqst()
394 rc = smb_send_kvec(server, &smb_msg, &sent); in __smb_send_rqst()
395 if (rc < 0) in __smb_send_rqst()
410 rc = smb_send_kvec(server, &smb_msg, &sent); in __smb_send_rqst()
411 if (rc < 0) in __smb_send_rqst()
434 rc = -EINTR; in __smb_send_rqst()
455 if (rc < 0 && rc != -EINTR) in __smb_send_rqst()
457 rc); in __smb_send_rqst()
458 else if (rc > 0) in __smb_send_rqst()
459 rc = 0; in __smb_send_rqst()
461 return rc; in __smb_send_rqst()
471 int rc; in smb_send_rqst() local
494 rc = server->ops->init_transform_rq(server, num_rqst + 1, in smb_send_rqst()
496 if (rc) in smb_send_rqst()
497 return rc; in smb_send_rqst()
499 rc = __smb_send_rqst(server, num_rqst + 1, &cur_rqst[0]); in smb_send_rqst()
501 return rc; in smb_send_rqst()
525 int rc; in wait_for_free_credits() local
560 rc = wait_event_killable_timeout(server->request_q, in wait_for_free_credits()
563 if (!rc) { in wait_for_free_credits()
570 if (rc == -ERESTARTSYS) in wait_for_free_credits()
597 rc = wait_event_killable_timeout( in wait_for_free_credits()
603 if (!rc) { in wait_for_free_credits()
611 if (rc == -ERESTARTSYS) in wait_for_free_credits()
731 int rc; in cifs_setup_async_request() local
747 rc = cifs_sign_rqst(rqst, server, &mid->sequence_number); in cifs_setup_async_request()
748 if (rc) { in cifs_setup_async_request()
750 return ERR_PTR(rc); in cifs_setup_async_request()
766 int rc; in cifs_call_async() local
775 rc = wait_for_free_request(server, flags, &instance); in cifs_call_async()
776 if (rc) in cifs_call_async()
777 return rc; in cifs_call_async()
820 rc = smb_send_rqst(server, 1, rqst, flags); in cifs_call_async()
823 if (rc < 0) { in cifs_call_async()
831 if (rc == 0) in cifs_call_async()
835 return rc; in cifs_call_async()
851 int rc; in SendReceiveNoRsp() local
859 rc = SendReceive2(xid, ses, iov, 1, &resp_buf_type, flags, &rsp_iov); in SendReceiveNoRsp()
860 cifs_dbg(NOISY, "SendRcvNoRsp flags %d rc %d\n", flags, rc); in SendReceiveNoRsp()
862 return rc; in SendReceiveNoRsp()
868 int rc = 0; in cifs_sync_mid_result() local
877 return rc; in cifs_sync_mid_result()
879 rc = -EAGAIN; in cifs_sync_mid_result()
882 rc = -EIO; in cifs_sync_mid_result()
885 rc = -EHOSTDOWN; in cifs_sync_mid_result()
894 rc = -EIO; in cifs_sync_mid_result()
899 return rc; in cifs_sync_mid_result()
921 int rc = 0; in cifs_check_receive() local
930 rc = cifs_verify_signature(&rqst, server, in cifs_check_receive()
932 if (rc) in cifs_check_receive()
934 rc); in cifs_check_receive()
944 int rc; in cifs_setup_request() local
952 rc = allocate_mid(ses, hdr, &mid); in cifs_setup_request()
953 if (rc) in cifs_setup_request()
954 return ERR_PTR(rc); in cifs_setup_request()
955 rc = cifs_sign_rqst(rqst, ses->server, &mid->sequence_number); in cifs_setup_request()
956 if (rc) { in cifs_setup_request()
958 return ERR_PTR(rc); in cifs_setup_request()
994 int i, j, optype, rc = 0; in compound_send_recv() local
1026 rc = wait_for_compound_request(server, num_rqst, flags, in compound_send_recv()
1028 if (rc) in compound_send_recv()
1029 return rc; in compound_send_recv()
1085 rc = smb_send_rqst(server, num_rqst, rqst, flags); in compound_send_recv()
1091 if (rc < 0) { in compound_send_recv()
1102 if (rc < 0 || (flags & CIFS_NO_SRV_RSP)) { in compound_send_recv()
1124 rc = wait_for_response(server, midQ[i]); in compound_send_recv()
1125 if (rc != 0) in compound_send_recv()
1128 if (rc != 0) { in compound_send_recv()
1145 if (rc < 0) in compound_send_recv()
1148 rc = cifs_sync_mid_result(midQ[i], server); in compound_send_recv()
1149 if (rc != 0) { in compound_send_recv()
1157 rc = -EIO; in compound_send_recv()
1172 rc = server->ops->check_receive(midQ[i], server, in compound_send_recv()
1204 return rc; in compound_send_recv()
1223 int rc; in SendReceive2() local
1248 rc = cifs_send_recv(xid, ses, &rqst, resp_buf_type, flags, resp_iov); in SendReceive2()
1251 return rc; in SendReceive2()
1259 int rc = 0; in SendReceive() local
1290 rc = wait_for_free_request(server, flags, &credits.instance); in SendReceive()
1291 if (rc) in SendReceive()
1292 return rc; in SendReceive()
1300 rc = allocate_mid(ses, in_buf, &midQ); in SendReceive()
1301 if (rc) { in SendReceive()
1305 return rc; in SendReceive()
1308 rc = cifs_sign_smb(in_buf, server, &midQ->sequence_number); in SendReceive()
1309 if (rc) { in SendReceive()
1317 rc = smb_send(server, in_buf, len); in SendReceive()
1321 if (rc < 0) in SendReceive()
1326 if (rc < 0) in SendReceive()
1329 rc = wait_for_response(server, midQ); in SendReceive()
1330 if (rc != 0) { in SendReceive()
1338 return rc; in SendReceive()
1343 rc = cifs_sync_mid_result(midQ, server); in SendReceive()
1344 if (rc != 0) { in SendReceive()
1346 return rc; in SendReceive()
1351 rc = -EIO; in SendReceive()
1358 rc = cifs_check_receive(midQ, server, 0); in SendReceive()
1363 return rc; in SendReceive()
1396 int rc = 0; in SendReceiveBlockingLock() local
1431 rc = wait_for_free_request(server, CIFS_BLOCKING_OP, &instance); in SendReceiveBlockingLock()
1432 if (rc) in SendReceiveBlockingLock()
1433 return rc; in SendReceiveBlockingLock()
1441 rc = allocate_mid(ses, in_buf, &midQ); in SendReceiveBlockingLock()
1442 if (rc) { in SendReceiveBlockingLock()
1444 return rc; in SendReceiveBlockingLock()
1447 rc = cifs_sign_smb(in_buf, server, &midQ->sequence_number); in SendReceiveBlockingLock()
1448 if (rc) { in SendReceiveBlockingLock()
1451 return rc; in SendReceiveBlockingLock()
1456 rc = smb_send(server, in_buf, len); in SendReceiveBlockingLock()
1460 if (rc < 0) in SendReceiveBlockingLock()
1465 if (rc < 0) { in SendReceiveBlockingLock()
1467 return rc; in SendReceiveBlockingLock()
1471 rc = wait_event_interruptible(server->response_q, in SendReceiveBlockingLock()
1477 if ((rc == -ERESTARTSYS) && in SendReceiveBlockingLock()
1485 rc = send_cancel(server, &rqst, midQ); in SendReceiveBlockingLock()
1486 if (rc) { in SendReceiveBlockingLock()
1488 return rc; in SendReceiveBlockingLock()
1494 rc = send_lock_cancel(xid, tcon, in_buf, out_buf); in SendReceiveBlockingLock()
1498 if (rc && rc != -ENOLCK) { in SendReceiveBlockingLock()
1500 return rc; in SendReceiveBlockingLock()
1504 rc = wait_for_response(server, midQ); in SendReceiveBlockingLock()
1505 if (rc) { in SendReceiveBlockingLock()
1512 return rc; in SendReceiveBlockingLock()
1521 rc = cifs_sync_mid_result(midQ, server); in SendReceiveBlockingLock()
1522 if (rc != 0) in SendReceiveBlockingLock()
1523 return rc; in SendReceiveBlockingLock()
1527 rc = -EIO; in SendReceiveBlockingLock()
1534 rc = cifs_check_receive(midQ, server, 0); in SendReceiveBlockingLock()
1537 if (rstart && rc == -EACCES) in SendReceiveBlockingLock()
1539 return rc; in SendReceiveBlockingLock()