Whamcloud - gitweb
b=21815 per-nid stats should not access lustre hash internal structures directly
[fs/lustre-release.git] / lustre / mdt / mdt_fs.c
index 2c38182..599881e 100644 (file)
@@ -61,16 +61,7 @@ int mdt_export_stats_init(struct obd_device *obd,
                 RETURN(rc);
         }
         if (newnid) {
-                /* Always add in ldlm_stats */
-                exp->exp_nid_stats->nid_ldlm_stats =
-                        lprocfs_alloc_stats(LDLM_LAST_OPC - LDLM_FIRST_OPC,
-                                            LPROCFS_STATS_FLAG_NOPERCPU);
-                if (exp->exp_nid_stats->nid_ldlm_stats == NULL)
-                        GOTO(clean, rc = -ENOMEM);
-                lprocfs_init_ldlm_stats(exp->exp_nid_stats->nid_ldlm_stats);
-                rc = lprocfs_register_stats(exp->exp_nid_stats->nid_proc,
-                                            "ldlm_stats",
-                                            exp->exp_nid_stats->nid_ldlm_stats);
+                rc = lprocfs_nid_ldlm_stats_init(exp->exp_nid_stats);
                 if (rc)
                         GOTO(clean, rc);
         }