- cfs_duration_usec(dur, &tv);
-
- if (cfs_copy_to_user(&ent->rpe_peer,
- &nd->nd_id, sizeof(lnet_process_id_t)) ||
- cfs_copy_to_user(&ent->rpe_stamp, &tv, sizeof(tv)) ||
- cfs_copy_to_user(&ent->rpe_state,
- &nd->nd_state, sizeof(nd->nd_state)) ||
- cfs_copy_to_user(&ent->rpe_rpc_errno, &error,
- sizeof(error)))
- return -EFAULT;
-
- if (error != 0)
- continue;
-
- /* RPC is done */
- rep = (srpc_generic_reply_t *)&msg->msg_body.reply;
-
- if (cfs_copy_to_user(&ent->rpe_sid,
- &rep->sid, sizeof(lst_sid_t)) ||
- cfs_copy_to_user(&ent->rpe_fwk_errno,
- &rep->status, sizeof(rep->status)))
- return -EFAULT;
-
- if (readent == NULL)
- continue;
-
- if ((error = readent(trans->tas_opc, msg, ent)) != 0)
- return error;
- }
+ jiffies_to_timeval(dur, &tv);
+
+ if (copy_to_user(&ent->rpe_peer,
+ &nd->nd_id, sizeof(struct lnet_process_id)) ||
+ copy_to_user(&ent->rpe_stamp, &tv, sizeof(tv)) ||
+ copy_to_user(&ent->rpe_state,
+ &nd->nd_state, sizeof(nd->nd_state)) ||
+ copy_to_user(&ent->rpe_rpc_errno, &error,
+ sizeof(error)))
+ return -EFAULT;
+
+ if (error != 0)
+ continue;
+
+ /* RPC is done */
+ rep = (srpc_generic_reply_t *)&msg->msg_body.reply;
+
+ if (copy_to_user(&ent->rpe_sid,
+ &rep->sid, sizeof(rep->sid)) ||
+ copy_to_user(&ent->rpe_fwk_errno,
+ &rep->status, sizeof(rep->status)))
+ return -EFAULT;
+
+ if (readent == NULL)
+ continue;
+
+ error = readent(trans->tas_opc, msg, ent);
+ if (error != 0)
+ return error;
+ }