From: Chris Horn Date: Tue, 24 Aug 2021 16:16:17 +0000 (-0500) Subject: LU-14962 lnet: Check for -ESHUTDOWN in lnet_parse X-Git-Tag: 2.14.55~60 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=cce82630cbf2c7badbbdd16a8ca9c8c0065ded13 LU-14962 lnet: Check for -ESHUTDOWN in lnet_parse The fix for LU-8106, http://review.whamcloud.com/19993, no longer works because rc does not have the return value from lnet_nid2peerni_locked(). Use PTR_ERR to get the return value and restore the LU-8106 fix. HPE-bug-id: LUS-10333 Fixes: fa8b4e6357 ("LU-7734 lnet: peer/peer_ni handling adjustments") Signed-off-by: Chris Horn Change-Id: I9cc2bc2d6e675d38cf06d99c524bdd95110bf0e9 Reviewed-on: https://review.whamcloud.com/44743 Tested-by: jenkins Reviewed-by: Amir Shehata Tested-by: Maloo Reviewed-by: James Simmons Reviewed-by: Oleg Drokin --- diff --git a/lnet/lnet/lib-move.c b/lnet/lnet/lib-move.c index 67ab256..e1acb18 100644 --- a/lnet/lnet/lib-move.c +++ b/lnet/lnet/lib-move.c @@ -4659,10 +4659,10 @@ lnet_parse(struct lnet_ni *ni, struct lnet_hdr *hdr, lnet_nid_t from_nid, cpt); if (IS_ERR(lpni)) { lnet_net_unlock(cpt); - CERROR("%s, src %s: Dropping %s " - "(error %ld looking up sender)\n", + rc = PTR_ERR(lpni); + CERROR("%s, src %s: Dropping %s (error %d looking up sender)\n", libcfs_nid2str(from_nid), libcfs_nid2str(src_nid), - lnet_msgtyp2str(type), PTR_ERR(lpni)); + lnet_msgtyp2str(type), rc); lnet_msg_free(msg); if (rc == -ESHUTDOWN) /* We are shutting down. Don't do anything more */