@@ -1422,11 +1422,10 @@ void lnet_usr_translate_stats(struct lnet_ioctl_element_msg_stats *msg_stats,
msg->msg_rtr_nid_param = rtr_nid;
msg->msg_sending = 0;
list_add_tail(&msg->msg_list, &peer->lp_dc_pendq);
- lnet_peer_ni_decref_locked(lpni);
- lnet_net_unlock(cpt);
-
CDEBUG(D_NET, "%s pending discovery\n",
libcfs_nid2str(peer->lp_primary_nid));
+ lnet_peer_ni_decref_locked(lpni);
+ lnet_net_unlock(cpt);
return LNET_DC_WAIT;
}
@@ -1560,10 +1559,10 @@ void lnet_usr_translate_stats(struct lnet_ioctl_element_msg_stats *msg_stats,
best_lpni->lpni_net->net_id, cpt);
/* If there is no best_ni we don't have a route */
if (!best_ni) {
- lnet_net_unlock(cpt);
CERROR("no path to %s from net %s\n",
libcfs_nid2str(best_lpni->lpni_nid),
libcfs_net2str(best_lpni->lpni_net->net_id));
+ lnet_net_unlock(cpt);
return -EHOSTUNREACH;
}
lpni = list_first_entry(&peer_net->lpn_peer_nis,
@@ -1718,9 +1717,9 @@ void lnet_usr_translate_stats(struct lnet_ioctl_element_msg_stats *msg_stats,
* move onto the next peer_ni in the peer
*/
if (!best_gw) {
- lnet_net_unlock(cpt);
LCONSOLE_WARN("No route to peer from %s\n",
libcfs_nid2str(best_ni->ni_nid));
+ lnet_net_unlock(cpt);
return -EHOSTUNREACH;
}