Whamcloud - gitweb
LU-14962 lnet: Check for -ESHUTDOWN in lnet_parse 43/44743/3
authorChris Horn <chris.horn@hpe.com>
Tue, 24 Aug 2021 16:16:17 +0000 (11:16 -0500)
committerOleg Drokin <green@whamcloud.com>
Sat, 11 Sep 2021 06:21:31 +0000 (06:21 +0000)
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 <chris.horn@hpe.com>
Change-Id: I9cc2bc2d6e675d38cf06d99c524bdd95110bf0e9
Reviewed-on: https://review.whamcloud.com/44743
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Amir Shehata <ashehata@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/lnet/lib-move.c

index 67ab256..e1acb18 100644 (file)
@@ -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 */