Whamcloud - gitweb
Branch HEAD
authorliangzhen <liangzhen>
Tue, 11 Nov 2008 08:47:59 +0000 (08:47 +0000)
committerliangzhen <liangzhen>
Tue, 11 Nov 2008 08:47:59 +0000 (08:47 +0000)
Assign msg_ev for GET before lnet_prep_send for REPLY

i=isaac

lnet/lnet/lib-move.c

index ef9a7bd..5b207da 100644 (file)
@@ -1715,17 +1715,17 @@ lnet_parse_get(lnet_ni_t *ni, lnet_msg_t *msg, int rdma_get)
 
         LNET_UNLOCK();
 
+        msg->msg_ev.type = LNET_EVENT_GET;
+        msg->msg_ev.target.pid = hdr->dest_pid;
+        msg->msg_ev.target.nid = hdr->dest_nid;
+        msg->msg_ev.hdr_data = 0;
+
         reply_wmd = hdr->msg.get.return_wmd;
 
         lnet_prep_send(msg, LNET_MSG_REPLY, src, offset, mlength);
 
         msg->msg_hdr.msg.reply.dst_wmd = reply_wmd;
 
-        msg->msg_ev.type = LNET_EVENT_GET;
-        msg->msg_ev.target.pid = hdr->dest_pid;
-        msg->msg_ev.target.nid = hdr->dest_nid;
-        msg->msg_ev.hdr_data = 0;
-
         if (rdma_get) {
                 /* The LND completes the REPLY from her recv procedure */
                 lnet_ni_recv(ni, msg->msg_private, msg, 0,