aboutsummaryrefslogtreecommitdiffstats
path: root/mm/vmstat.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/vmstat.c')
-rw-r--r--mm/vmstat.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/mm/vmstat.c b/mm/vmstat.c
index 6038ce593ce3..9c624595e904 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -1827,12 +1827,13 @@ static bool need_update(int cpu)
1827 1827
1828 /* 1828 /*
1829 * The fast way of checking if there are any vmstat diffs. 1829 * The fast way of checking if there are any vmstat diffs.
1830 * This works because the diffs are byte sized items.
1831 */ 1830 */
1832 if (memchr_inv(p->vm_stat_diff, 0, NR_VM_ZONE_STAT_ITEMS)) 1831 if (memchr_inv(p->vm_stat_diff, 0, NR_VM_ZONE_STAT_ITEMS *
1832 sizeof(p->vm_stat_diff[0])))
1833 return true; 1833 return true;
1834#ifdef CONFIG_NUMA 1834#ifdef CONFIG_NUMA
1835 if (memchr_inv(p->vm_numa_stat_diff, 0, NR_VM_NUMA_STAT_ITEMS)) 1835 if (memchr_inv(p->vm_numa_stat_diff, 0, NR_VM_NUMA_STAT_ITEMS *
1836 sizeof(p->vm_numa_stat_diff[0])))
1836 return true; 1837 return true;
1837#endif 1838#endif
1838 } 1839 }