diff --git a/lustre/mgs/mgs_handler.c b/lustre/mgs/mgs_handler.c
index 7673c43f8c4c54272fd109d018bb8d92b7bbf703..afb32553eda436f8ced3fa39daf305843519d396 100644
--- a/lustre/mgs/mgs_handler.c
+++ b/lustre/mgs/mgs_handler.c
@@ -131,6 +131,8 @@ static int mgs_disconnect(struct obd_export *exp)
         rc = class_disconnect(exp);
         ldlm_cancel_locks_for_export(exp);
 
+        lprocfs_exp_cleanup(exp);
+
         /* complete all outstanding replies */
         spin_lock(&exp->exp_lock);
         while (!list_empty(&exp->exp_outstanding_replies)) {
diff --git a/lustre/obdfilter/filter.c b/lustre/obdfilter/filter.c
index 0d138e13163d5b7fb3813543cb405808c9dfc191..3cac141c08e0e4f85ed678208b4db5053aa22fda 100644
--- a/lustre/obdfilter/filter.c
+++ b/lustre/obdfilter/filter.c
@@ -2882,7 +2882,6 @@ static int filter_destroy_export(struct obd_export *exp)
         if (obd_uuid_equals(&exp->exp_client_uuid, &exp->exp_obd->obd_uuid))
                 RETURN(0);
 
-        lprocfs_exp_cleanup(exp);
 
         if (exp->exp_obd->obd_replayable)
                 filter_client_free(exp);
@@ -2971,6 +2970,8 @@ static int filter_disconnect(struct obd_export *exp)
 
         fsfilt_sync(obd, obd->u.obt.obt_sb);
 
+        lprocfs_exp_cleanup(exp);
+
         /* flush any remaining cancel messages out to the target */
         filter_sync_llogs(obd, exp);
         class_export_put(exp);