From: yangsheng Date: Mon, 20 Sep 2010 14:32:01 +0000 (+0800) Subject: b=22770 Removed the LASSERT since (conn == NULL) is a legitimate case. X-Git-Tag: v1_8_4_53~3 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=cd5ef78d7ac264956924ab7de8dd44ade5e362f1;p=fs%2Flustre-release.git b=22770 Removed the LASSERT since (conn == NULL) is a legitimate case. i=adigler i=panda --- diff --git a/lustre/obdclass/lprocfs_status.c b/lustre/obdclass/lprocfs_status.c index d60c009..6b7158e 100644 --- a/lustre/obdclass/lprocfs_status.c +++ b/lustre/obdclass/lprocfs_status.c @@ -622,16 +622,21 @@ int lprocfs_rd_server_uuid(char *page, char **start, off_t off, int count, int lprocfs_rd_conn_uuid(char *page, char **start, off_t off, int count, int *eof, void *data) { - struct obd_device *obd = (struct obd_device*)data; + struct obd_device *obd = data; struct ptlrpc_connection *conn; int rc = 0; LASSERT(obd != NULL); + LPROCFS_CLIMP_CHECK(obd); conn = obd->u.cli.cl_import->imp_connection; - LASSERT(conn != NULL); *eof = 1; - rc = snprintf(page, count, "%s\n", conn->c_remote_uuid.uuid); + if (conn) { + rc = snprintf(page, count, "%s\n", + conn->c_remote_uuid.uuid); + } else { + rc = snprintf(page, count, "%s\n", ""); + } LPROCFS_CLIMP_EXIT(obd); return rc;