Whamcloud - gitweb
b=21871 Cleanup procfs export when exp_refcount == 0.
authoryangsheng <Sheng.Yang@Sun.COM>
Tue, 11 May 2010 14:09:49 +0000 (22:09 +0800)
committerjohann <johann@granier.local>
Mon, 17 May 2010 07:07:24 +0000 (09:07 +0200)
i=nathan
i=johann

lustre/ldlm/ldlm_lib.c
lustre/mds/handler.c
lustre/mgs/mgs_handler.c
lustre/obdclass/genops.c
lustre/obdfilter/filter.c

index 2d2aa6b..44666ab 100644 (file)
@@ -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);
 }
 
index 7c529c2..dcefe8a 100644 (file)
@@ -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);
         }
index da21f37..5c16241 100644 (file)
@@ -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);
         }
index eab7402..0116e29 100644 (file)
@@ -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);
index 278793a..8e9aec4 100644 (file)
@@ -2458,7 +2458,6 @@ cleanup:
                         fed->fed_lcd = NULL;
                 }
                 class_disconnect(exp);
-                lprocfs_exp_cleanup(exp);
         } else {
                 class_export_put(exp);
         }