LASSERT (nid != LNET_NID_ANY);
- list_for_each_entry (peer, peer_list, stp_list) {
+ cfs_list_for_each_entry_typed (peer, peer_list,
+ srpc_peer_t, stp_list) {
if (peer->stp_nid == nid)
return peer;
}
rpc->srpc_reqstbuf = buffer;
rpc->srpc_peer = buffer->buf_peer;
rpc->srpc_self = buffer->buf_self;
- rpc->srpc_replymdh = LNET_INVALID_HANDLE;
+ LNetInvalidateHandle(&rpc->srpc_replymdh);
}
int
{
int rc;
int portal;
- lnet_process_id_t any = {.nid = LNET_NID_ANY,
- .pid = LNET_PID_ANY};
+ lnet_process_id_t any = {0};
+
+ any.nid = LNET_NID_ANY;
+ any.pid = LNET_PID_ANY;
if (service > SRPC_FRAMEWORK_SERVICE_MAX_ID)
portal = SRPC_REQUEST_PORTAL;
LASSERT (!sv->sv_shuttingdown);
- buf->buf_mdh = LNET_INVALID_HANDLE;
+ LNetInvalidateHandle(&buf->buf_mdh);
list_add(&buf->buf_list, &sv->sv_posted_msgq);
sv->sv_nposted_msg++;
spin_unlock(&sv->sv_lock);
sv->sv_shuttingdown = 1; /* i.e. no new active RPC */
/* schedule in-flight RPCs to notice the shutdown */
- list_for_each_entry (rpc, &sv->sv_active_rpcq, srpc_list) {
+ cfs_list_for_each_entry_typed (rpc, &sv->sv_active_rpcq,
+ srpc_server_rpc_t, srpc_list) {
swi_schedule_workitem(&rpc->srpc_wi);
}
/* OK to traverse sv_posted_msgq without lock, since no one
* touches sv_posted_msgq now */
- list_for_each_entry (buf, &sv->sv_posted_msgq, buf_list)
+ cfs_list_for_each_entry_typed (buf, &sv->sv_posted_msgq,
+ srpc_buffer_t, buf_list)
LNetMDUnlink(buf->buf_mdh);
return;
srpc_data.rpc_state = SRPC_STATE_NI_INIT;
- srpc_data.rpc_lnet_eq = LNET_EQ_NONE;
+ LNetInvalidateHandle(&srpc_data.rpc_lnet_eq);
#ifdef __KERNEL__
rc = LNetEQAlloc(16, srpc_lnet_ev_handler, &srpc_data.rpc_lnet_eq);
#else