From 0d03102907a112246759023f43800a6c48a2fc06 Mon Sep 17 00:00:00 2001 From: alex Date: Tue, 31 May 2005 12:41:17 +0000 Subject: [PATCH] - don't try to show nid for non-connected exports --- lustre/obdclass/genops.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) 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); -- 1.8.3.1