Whamcloud - gitweb
LU-7734 lnet: minor fixes
authorAmir Shehata <amir.shehata@intel.com>
Wed, 20 Jul 2016 09:11:50 +0000 (02:11 -0700)
committerAmir Shehata <amir.shehata@intel.com>
Wed, 25 Jan 2017 03:10:17 +0000 (19:10 -0800)
Fixed some issues Gatekeeper helper robot pointed out

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: Id33b4c9e94b22bddc0bfddf8f51235b81d3d86dc
Reviewed-on: http://review.whamcloud.com/21450

lnet/lnet/api-ni.c
lnet/lnet/lib-move.c
lnet/lnet/peer.c

index 8aa37e7..e3e120e 100644 (file)
@@ -2516,7 +2516,7 @@ lnet_dyn_add_net(struct lnet_ioctl_config_data *conf)
 
        LASSERT(lnet_net_unique(net->net_id, &the_lnet.ln_nets, NULL));
 
 
        LASSERT(lnet_net_unique(net->net_id, &the_lnet.ln_nets, NULL));
 
-       memset(&tun, sizeof(tun), 0);
+       memset(&tun, 0, sizeof(tun));
 
        tun.lt_cmn.lct_peer_timeout =
          conf->cfg_config_u.cfg_net.net_peer_timeout;
 
        tun.lt_cmn.lct_peer_timeout =
          conf->cfg_config_u.cfg_net.net_peer_timeout;
index 79ca5b7..311335a 100644 (file)
@@ -1793,7 +1793,8 @@ pick_peer:
 
        /* if we still can't find a peer ni then we can't reach it */
        if (!best_lpni) {
 
        /* if we still can't find a peer ni then we can't reach it */
        if (!best_lpni) {
-               __u32 net_id = peer_net->lpn_net_id;
+               __u32 net_id = (peer_net) ? peer_net->lpn_net_id :
+                       LNET_NIDNET(dst_nid);
                lnet_net_unlock(cpt);
                LCONSOLE_WARN("no peer_ni found on peer net %s\n",
                                libcfs_net2str(net_id));
                lnet_net_unlock(cpt);
                LCONSOLE_WARN("no peer_ni found on peer net %s\n",
                                libcfs_net2str(net_id));
index a1f6990..6b19d2d 100644 (file)
@@ -304,7 +304,7 @@ lnet_peer_ni_del_locked(struct lnet_peer_ni *lpni)
        return 0;
 }
 
        return 0;
 }
 
-void lnet_peer_uninit()
+void lnet_peer_uninit(void)
 {
        struct lnet_peer_ni *lpni, *tmp;
 
 {
        struct lnet_peer_ni *lpni, *tmp;