Whamcloud - gitweb
LU-11300 lnet: simplify lnet_handle_local_failure() 52/33452/30
authorAmir Shehata <ashehata@whamcloud.com>
Mon, 22 Oct 2018 20:39:36 +0000 (13:39 -0700)
committerAmir Shehata <ashehata@whamcloud.com>
Fri, 7 Jun 2019 18:15:16 +0000 (18:15 +0000)
Pass the struct lnet_ni to lnet_handle_local_failure() instead of the
message structure, since nothing else from the message is being
used. This also makes symmetrical with lnet_handle_remote_failure()

Test-Parameters: forbuildonly
Signed-off-by: Amir Shehata <ashehata@whamcloud.com>
Change-Id: I10146ec5bf5f378e28a7725382f00132ada32c6e
Reviewed-on: https://review.whamcloud.com/33452
Reviewed-by: Olaf Weber <olaf.weber@hpe.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Tested-by: Jenkins
lnet/lnet/lib-msg.c

index f785f55..872476f 100644 (file)
@@ -453,12 +453,8 @@ lnet_dec_healthv_locked(atomic_t *healthv)
 }
 
 static void
-lnet_handle_local_failure(struct lnet_msg *msg)
+lnet_handle_local_failure(struct lnet_ni *local_ni)
 {
-       struct lnet_ni *local_ni;
-
-       local_ni = msg->msg_txni;
-
        /*
         * the lnet_net_lock(0) is used to protect the addref on the ni
         * and the recovery queue.
@@ -651,7 +647,7 @@ lnet_health_check(struct lnet_msg *msg)
        case LNET_MSG_STATUS_LOCAL_ABORTED:
        case LNET_MSG_STATUS_LOCAL_NO_ROUTE:
        case LNET_MSG_STATUS_LOCAL_TIMEOUT:
-               lnet_handle_local_failure(msg);
+               lnet_handle_local_failure(msg->msg_txni);
                /* add to the re-send queue */
                goto resend;
 
@@ -660,7 +656,7 @@ lnet_health_check(struct lnet_msg *msg)
         * finalize the message
         */
        case LNET_MSG_STATUS_LOCAL_ERROR:
-               lnet_handle_local_failure(msg);
+               lnet_handle_local_failure(msg->msg_txni);
                return -1;
 
        /*