If the peer has changed after we unlocked the cpt then
we'll need to discover the new peer.
Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: Ib880746d5e67bbea1aa43122fa3aa115261c8664
Reviewed-on: https://review.whamcloud.com/28772
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Olaf Weber <olaf.weber@hpe.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lnet_net_unlock(LNET_LOCK_EX);
lnet_net_lock(cpt);
+ /*
+ * If the peer has changed after we've discovered the older peer,
+ * then we need to discovery the new peer to make sure the
+ * interface information is up to date
+ */
+ if (lp != lpni->lpni_peer_net->lpn_peer)
+ goto again;
+
if (signal_pending(current))
rc = -EINTR;
else if (the_lnet.ln_dc_state != LNET_DC_STATE_RUNNING)