struct l_wait_info lwi;
int rc;
- LASSERT(!in_interrupt()); /* might sleep */
+ LASSERT(!cfs_in_interrupt()); /* might sleep */
if (!ptlrpc_server_bulk_active(desc)) /* completed or */
return; /* never started */
int rc;
ENTRY;
- LASSERT(!in_interrupt()); /* might sleep */
+ LASSERT(!cfs_in_interrupt()); /* might sleep */
/* Let's setup deadline for reply unlink. */
if (OBD_FAIL_CHECK(OBD_FAIL_PTLRPC_LONG_BULK_UNLINK) &&
CERROR("not replying on NULL connection\n"); /* bug 9635 */
return -ENOTCONN;
}
- atomic_inc (&svc->srv_outstanding_replies);
+ cfs_atomic_inc (&svc->srv_outstanding_replies);
ptlrpc_rs_addref(rs); /* +1 ref for the network */
rc = sptlrpc_svc_wrap_reply(req);
req->rq_xid, req->rq_reply_off);
out:
if (unlikely(rc != 0)) {
- atomic_dec (&svc->srv_outstanding_replies);
+ cfs_atomic_dec (&svc->srv_outstanding_replies);
ptlrpc_req_drop_rs(req);
}
ptlrpc_connection_put(conn);
}
}
- spin_lock(&request->rq_lock);
+ cfs_spin_lock(&request->rq_lock);
/* If the MD attach succeeds, there _will_ be a reply_in callback */
request->rq_receiving_reply = !noreply;
/* We are responsible for unlinking the reply buffer */
request->rq_resend = 0;
request->rq_restart = 0;
request->rq_reply_truncate = 0;
- spin_unlock(&request->rq_lock);
+ cfs_spin_unlock(&request->rq_lock);
if (!noreply) {
reply_md.start = request->rq_repbuf;
if (rc != 0) {
CERROR("LNetMDAttach failed: %d\n", rc);
LASSERT (rc == -ENOMEM);
- spin_lock(&request->rq_lock);
+ cfs_spin_lock(&request->rq_lock);
/* ...but the MD attach didn't succeed... */
request->rq_receiving_reply = 0;
- spin_unlock(&request->rq_lock);
+ cfs_spin_unlock(&request->rq_lock);
GOTO(cleanup_me, rc = -ENOMEM);
}
ptlrpc_request_addref(request);
if (obd->obd_svc_stats != NULL)
lprocfs_counter_add(obd->obd_svc_stats, PTLRPC_REQACTIVE_CNTR,
- atomic_read(&request->rq_import->imp_inflight));
+ cfs_atomic_read(&request->rq_import->imp_inflight));
OBD_FAIL_TIMEOUT(OBD_FAIL_PTLRPC_DELAY_SEND, request->rq_timeout + 5);
- do_gettimeofday(&request->rq_arrival_time);
+ cfs_gettimeofday(&request->rq_arrival_time);
request->rq_sent = cfs_time_current_sec();
/* We give the server rq_timeout secs to process the req, and
add the network latency for our local timeout. */