From 5a06eb17c1cddccfdff29063fb18af89b849528c Mon Sep 17 00:00:00 2001 From: bobijam Date: Wed, 1 Apr 2009 03:08:44 +0000 Subject: [PATCH] Branch b_release_1_8_0 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 | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lustre/mds/handler.c b/lustre/mds/handler.c index 83cee2b..dc5b503 100644 --- a/lustre/mds/handler.c +++ b/lustre/mds/handler.c @@ -2121,7 +2121,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); @@ -2573,7 +2575,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 901481a..e4e872e 100644 --- a/lustre/obdclass/lprocfs_status.c +++ b/lustre/obdclass/lprocfs_status.c @@ -1500,7 +1500,7 @@ int lprocfs_exp_setup(struct obd_export *exp, lnet_nid_t *nid, int *newnid) RETURN(-EINVAL); /* not test against zero because eric say: - * You may only test nid against another nid, or LNET_NID_ANY. + * You may only test nid against another nid, or LNET_NID_ANY. * Anything else is nonsense.*/ if (!nid || *nid == LNET_NID_ANY) RETURN(0); @@ -1591,7 +1591,6 @@ int lprocfs_exp_setup(struct obd_export *exp, lnet_nid_t *nid, int *newnid) if (IS_ERR(entry)) { CWARN("Error adding the hash file\n"); rc = PTR_ERR(entry); - lprocfs_remove(&new_stat->nid_proc); GOTO(destroy_new_ns, rc); } @@ -1605,6 +1604,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