From 0dfbf47070cfc33aa7b0831c5e5ed143e7041513 Mon Sep 17 00:00:00 2001 From: yangsheng Date: Tue, 11 May 2010 22:09:49 +0800 Subject: [PATCH] b=21871 Cleanup procfs export when exp_refcount == 0. i=nathan i=johann --- lustre/ldlm/ldlm_lib.c | 3 --- lustre/mds/handler.c | 2 -- lustre/mgs/mgs_handler.c | 1 - lustre/obdclass/genops.c | 3 +++ lustre/obdfilter/filter.c | 1 - 5 files changed, 3 insertions(+), 7 deletions(-) diff --git a/lustre/ldlm/ldlm_lib.c b/lustre/ldlm/ldlm_lib.c index 2d2aa6b..44666ab 100644 --- a/lustre/ldlm/ldlm_lib.c +++ b/lustre/ldlm/ldlm_lib.c @@ -551,9 +551,6 @@ int server_disconnect_export(struct obd_export *exp) } spin_unlock(&exp->exp_lock); - /* release nid stat refererence */ - lprocfs_exp_cleanup(exp); - RETURN(rc); } diff --git a/lustre/mds/handler.c b/lustre/mds/handler.c index 7c529c2..dcefe8a 100644 --- a/lustre/mds/handler.c +++ b/lustre/mds/handler.c @@ -388,8 +388,6 @@ out: med->med_lcd = NULL; } class_disconnect(exp); - /* release nid stat refererence */ - lprocfs_exp_cleanup(exp); } else { class_export_put(exp); } diff --git a/lustre/mgs/mgs_handler.c b/lustre/mgs/mgs_handler.c index da21f37..5c16241 100644 --- a/lustre/mgs/mgs_handler.c +++ b/lustre/mgs/mgs_handler.c @@ -90,7 +90,6 @@ static int mgs_connect(struct lustre_handle *conn, struct obd_device *obd, rc = mgs_export_stats_init(obd, exp, 0, localdata); if (rc) { class_disconnect(exp); - lprocfs_exp_cleanup(exp); } else { class_export_put(exp); } diff --git a/lustre/obdclass/genops.c b/lustre/obdclass/genops.c index eab7402..0116e29 100644 --- a/lustre/obdclass/genops.c +++ b/lustre/obdclass/genops.c @@ -654,6 +654,9 @@ void __class_export_put(struct obd_export *exp) CDEBUG(D_IOCTL, "final put %p/%s\n", exp, exp->exp_client_uuid.uuid); + /* release nid stat refererence */ + lprocfs_exp_cleanup(exp); + spin_lock(&obd_zombie_impexp_lock); list_add(&exp->exp_obd_chain, &obd_zombie_exports); spin_unlock(&obd_zombie_impexp_lock); diff --git a/lustre/obdfilter/filter.c b/lustre/obdfilter/filter.c index 278793a..8e9aec4 100644 --- a/lustre/obdfilter/filter.c +++ b/lustre/obdfilter/filter.c @@ -2458,7 +2458,6 @@ cleanup: fed->fed_lcd = NULL; } class_disconnect(exp); - lprocfs_exp_cleanup(exp); } else { class_export_put(exp); } -- 1.8.3.1