From cd5ef78d7ac264956924ab7de8dd44ade5e362f1 Mon Sep 17 00:00:00 2001 From: yangsheng Date: Mon, 20 Sep 2010 22:32:01 +0800 Subject: [PATCH] b=22770 Removed the LASSERT since (conn == NULL) is a legitimate case. i=adigler i=panda --- lustre/obdclass/lprocfs_status.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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; -- 1.8.3.1