From f9152bc4939808cf8db36838391b72f5c6d5dc29 Mon Sep 17 00:00:00 2001 From: bobijam Date: Wed, 1 Apr 2009 02:33:07 +0000 Subject: [PATCH] Branch b1_6 b=18895 i=tappro i=alexey.lyashkov (shadow) when mds_setup() fails the error handle path needs clean possibly built nid_stat which builds nid_proc on obd's obd_proc_exports_entry. --- lustre/mds/handler.c | 4 +++- lustre/obdclass/lprocfs_status.c | 7 ++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lustre/mds/handler.c b/lustre/mds/handler.c index 5713d83..dbe86f9 100644 --- a/lustre/mds/handler.c +++ b/lustre/mds/handler.c @@ -2190,7 +2190,9 @@ err_fs: mds_fs_cleanup(obd); upcall_cache_cleanup(mds->mds_group_hash); mds->mds_group_hash = NULL; + remove_proc_entry("clear", obd->obd_proc_exports_entry); err_ns: + lprocfs_free_per_client_stats(obd); lprocfs_free_obd_stats(obd); lprocfs_obd_cleanup(obd); ldlm_namespace_free(obd->obd_namespace, NULL, 0); @@ -2637,7 +2639,7 @@ static int mds_intent_policy(struct ldlm_namespace *ns, unlock_res_and_lock(new_lock); lustre_hash_add(new_lock->l_export->exp_lock_hash, - &new_lock->l_remote_handle, + &new_lock->l_remote_handle, &new_lock->l_exp_hash); LDLM_LOCK_PUT(new_lock); diff --git a/lustre/obdclass/lprocfs_status.c b/lustre/obdclass/lprocfs_status.c index ef6133b..c755017 100644 --- a/lustre/obdclass/lprocfs_status.c +++ b/lustre/obdclass/lprocfs_status.c @@ -1484,8 +1484,8 @@ int lprocfs_exp_setup(struct obd_export *exp, lnet_nid_t *nid, int *newnid) !exp->exp_obd->obd_nid_stats_hash) RETURN(-EINVAL); - /* not test against zero because eric say: - * You may only test nid against another nid, or LNET_NID_ANY. + /* not test against zero because eric say: + * You may only test nid against another nid, or LNET_NID_ANY. * Anything else is nonsense.*/ if (!nid || *nid == LNET_NID_ANY) RETURN(0); @@ -1573,7 +1573,6 @@ int lprocfs_exp_setup(struct obd_export *exp, lnet_nid_t *nid, int *newnid) lprocfs_exp_rd_hash, NULL, new_stat); if (rc) { CWARN("Error adding the hash file\n"); - lprocfs_remove(&new_stat->nid_proc); GOTO(destroy_new_ns, rc); } @@ -1587,6 +1586,8 @@ int lprocfs_exp_setup(struct obd_export *exp, lnet_nid_t *nid, int *newnid) RETURN(rc); destroy_new_ns: + if (new_stat->nid_proc != NULL) + lprocfs_remove(&new_stat->nid_proc); lustre_hash_del(obd->obd_nid_stats_hash, nid, &new_stat->nid_hash); OBD_FREE_PTR(new_ns_uuid); -- 1.8.3.1