From f8c7dd6f53748cf589b2a1f18d93b92761f9d983 Mon Sep 17 00:00:00 2001 From: Amir Shehata Date: Mon, 22 Oct 2018 13:39:36 -0700 Subject: [PATCH] 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 --- lnet/lnet/lib-msg.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) 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; /* -- 1.8.3.1