Skip to content

Commit c792e82

Browse files
hnaztorvalds
authored andcommitted
mm: memcontrol: drop superfluous entry in the per-memcg stats array
MEM_CGROUP_STAT_NSTATS is just a delimiter for cgroup1 statistics, not an actual array entry. Reuse it for the first cgroup2 stat entry, like in the event array. Fixes: b2807f0 ("mm: memcontrol: add "sock" to cgroup2 memory.stat") Signed-off-by: Johannes Weiner <[email protected]> Cc: Vladimir Davydov <[email protected]> Cc: Michal Hocko <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 461c7fa commit c792e82

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/linux/memcontrol.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ enum mem_cgroup_stat_index {
5151
MEM_CGROUP_STAT_SWAP, /* # of pages, swapped out */
5252
MEM_CGROUP_STAT_NSTATS,
5353
/* default hierarchy stats */
54-
MEMCG_SOCK,
54+
MEMCG_SOCK = MEM_CGROUP_STAT_NSTATS,
5555
MEMCG_NR_STAT,
5656
};
5757

0 commit comments

Comments
 (0)