mm/vmstat.c: assert that vmstat_text is in sync with stat_items_size
[muen/linux.git] / mm / vmstat.c
index dab53430f63c2958aacc66e60c14d9840611245a..6038ce593ce3e1ca4cce34a02bc0bbd4c1d3a296 100644 (file)
@@ -1665,6 +1665,8 @@ static void *vmstat_start(struct seq_file *m, loff_t *pos)
        stat_items_size += sizeof(struct vm_event_state);
 #endif
 
+       BUILD_BUG_ON(stat_items_size !=
+                    ARRAY_SIZE(vmstat_text) * sizeof(unsigned long));
        v = kmalloc(stat_items_size, GFP_KERNEL);
        m->private = v;
        if (!v)