From: Johannes Weiner Date: Tue, 29 May 2012 22:07:05 +0000 (-0700) Subject: mm: memcg: remove obsolete statistics array boundary enum item X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6104621de4ffd94d66eae59cedc70d742a92316b;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git mm: memcg: remove obsolete statistics array boundary enum item MEM_CGROUP_STAT_DATA is a leftover from when item counters were living in the same array as ever-increasing event counters. It's no longer needed, use MEM_CGROUP_STAT_NSTATS to iterate over the stat array. Signed-off-by: Johannes Weiner Acked-by: Michal Hocko Acked-by: KAMEZAWA Hiroyuki Cc: Ying Han Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 37bae5571a47..6f0c5e7f9197 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -88,7 +88,6 @@ enum mem_cgroup_stat_index { MEM_CGROUP_STAT_RSS, /* # of pages charged as anon rss */ MEM_CGROUP_STAT_FILE_MAPPED, /* # of pages charged as file rss */ MEM_CGROUP_STAT_SWAPOUT, /* # of pages, swapped out */ - MEM_CGROUP_STAT_DATA, /* end of data requires synchronization */ MEM_CGROUP_STAT_NSTATS, }; @@ -2135,7 +2134,7 @@ static void mem_cgroup_drain_pcp_counter(struct mem_cgroup *memcg, int cpu) int i; spin_lock(&memcg->pcp_counter_lock); - for (i = 0; i < MEM_CGROUP_STAT_DATA; i++) { + for (i = 0; i < MEM_CGROUP_STAT_NSTATS; i++) { long x = per_cpu(memcg->stat->count[i], cpu); per_cpu(memcg->stat->count[i], cpu) = 0;