From e22b2dc6008971c52f31525d85bd47ba8fa6d77b Mon Sep 17 00:00:00 2001 From: yangsheng Date: Fri, 20 Aug 2010 04:55:43 +0400 Subject: [PATCH] b=21871 Just cleanup export nid_stat while exp_refcount == 0. i=nathan i=johann --- lustre/ldlm/ldlm_lib.c | 3 --- lustre/mdt/mdt_fs.c | 1 - lustre/mgs/mgs_fs.c | 1 - lustre/obdclass/genops.c | 4 ++++ lustre/obdfilter/filter.c | 2 -- 5 files changed, 4 insertions(+), 7 deletions(-) diff --git a/lustre/ldlm/ldlm_lib.c b/lustre/ldlm/ldlm_lib.c index 44b6130..aa794f7 100644 --- a/lustre/ldlm/ldlm_lib.c +++ b/lustre/ldlm/ldlm_lib.c @@ -577,9 +577,6 @@ int server_disconnect_export(struct obd_export *exp) } cfs_spin_unlock(&exp->exp_lock); - /* release nid stat refererence */ - lprocfs_exp_cleanup(exp); - RETURN(rc); } diff --git a/lustre/mdt/mdt_fs.c b/lustre/mdt/mdt_fs.c index aff8feb..1770620 100644 --- a/lustre/mdt/mdt_fs.c +++ b/lustre/mdt/mdt_fs.c @@ -68,6 +68,5 @@ int mdt_export_stats_init(struct obd_device *obd, } RETURN(0); clean: - lprocfs_exp_cleanup(exp); return rc; } diff --git a/lustre/mgs/mgs_fs.c b/lustre/mgs/mgs_fs.c index 43e185e..fe83a4d 100644 --- a/lustre/mgs/mgs_fs.c +++ b/lustre/mgs/mgs_fs.c @@ -82,7 +82,6 @@ int mgs_export_stats_init(struct obd_device *obd, struct obd_export *exp, } RETURN(0); clean: - lprocfs_exp_cleanup(exp); return rc; } diff --git a/lustre/obdclass/genops.c b/lustre/obdclass/genops.c index d41576c..e7632ca 100644 --- a/lustre/obdclass/genops.c +++ b/lustre/obdclass/genops.c @@ -760,6 +760,10 @@ void class_export_put(struct obd_export *exp) LASSERT(!cfs_list_empty(&exp->exp_obd_chain)); CDEBUG(D_IOCTL, "final put %p/%s\n", exp, exp->exp_client_uuid.uuid); + + /* release nid stat refererence */ + lprocfs_exp_cleanup(exp); + obd_zombie_export_add(exp); } } diff --git a/lustre/obdfilter/filter.c b/lustre/obdfilter/filter.c index 1c485bb..3570a30 100644 --- a/lustre/obdfilter/filter.c +++ b/lustre/obdfilter/filter.c @@ -290,7 +290,6 @@ static int filter_export_stats_init(struct obd_device *obd, RETURN(0); clean: - lprocfs_exp_cleanup(exp); return rc; } @@ -2808,7 +2807,6 @@ static int filter_connect(const struct lu_env *env, cleanup: if (rc) { class_disconnect(lexp); - lprocfs_exp_cleanup(lexp); *exp = NULL; } else { *exp = lexp; -- 1.8.3.1