From: Amir Shehata Date: Mon, 22 Oct 2018 20:39:36 +0000 (-0700) Subject: LU-11300 lnet: simplify lnet_handle_local_failure() X-Git-Tag: 2.12.55~25^2~18 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F52%2F33452%2F30;p=fs%2Flustre-release.git LU-11300 lnet: simplify lnet_handle_local_failure() 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 Change-Id: I10146ec5bf5f378e28a7725382f00132ada32c6e Reviewed-on: https://review.whamcloud.com/33452 Reviewed-by: Olaf Weber Reviewed-by: Sebastien Buisson Tested-by: Jenkins --- diff --git a/lnet/lnet/lib-msg.c b/lnet/lnet/lib-msg.c index f785f55..872476f 100644 --- a/lnet/lnet/lib-msg.c +++ b/lnet/lnet/lib-msg.c @@ -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; /*