Whamcloud - gitweb
LU-7297 osd-zfs: initialize oh_lock
[fs/lustre-release.git] / lustre / osd-zfs / osd_lproc.c
index 86957ff..c48638a 100644 (file)
@@ -156,9 +156,12 @@ LPROC_SEQ_FOPS(osd_brw_stats);
 
 static int osd_stats_init(struct osd_device *osd)
 {
-       int result;
+       int result, i;
        ENTRY;
 
+       for (i = 0; i < BRW_LAST; i++)
+               spin_lock_init(&osd->od_brw_stats.hist[i].oh_lock);
+
        osd->od_stats = lprocfs_alloc_stats(LPROC_OSD_LAST, 0);
        if (osd->od_stats != NULL) {
                result = lprocfs_register_stats(osd->od_proc_entry, "stats",