From: alex Date: Tue, 31 May 2005 12:41:17 +0000 (+0000) Subject: - don't try to show nid for non-connected exports X-Git-Tag: v1_7_100~1240 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=0d03102907a112246759023f43800a6c48a2fc06;hp=81a650e8e9a6f96cadf23acb84b80e9e3e3f21af - don't try to show nid for non-connected exports --- diff --git a/lustre/obdclass/genops.c b/lustre/obdclass/genops.c index ca55015..09ef3c2 100644 --- a/lustre/obdclass/genops.c +++ b/lustre/obdclass/genops.c @@ -756,14 +756,15 @@ int class_disconnect_stale_exports(struct obd_device *obd, spin_lock(&obd->obd_dev_lock); list_for_each_safe(pos, n, &obd->obd_exports) { exp = list_entry(pos, struct obd_export, exp_obd_chain); - if (!test_export(exp)) { - list_del(&exp->exp_obd_chain); - list_add(&exp->exp_obd_chain, &work_list); - cnt++; - ptlrpc_peernid2str(&exp->exp_connection->c_peer, str); - CDEBUG(D_ERROR, "%s: disconnect stale client %s@%s\n", - obd->obd_name, exp->exp_client_uuid.uuid, str); - } + if (test_export(exp)) + continue; + list_del(&exp->exp_obd_chain); + list_add(&exp->exp_obd_chain, &work_list); + cnt++; + CDEBUG(D_ERROR, "%s: disconnect stale client %s@%s\n", + obd->obd_name, exp->exp_client_uuid.uuid, + exp->exp_connection == NULL ? "" : + ptlrpc_peernid2str(&exp->exp_connection->c_peer, str)); } spin_unlock(&obd->obd_dev_lock);