hugetlb_cgroup: fix wrong hugetlb cgroup numa stat
authorMiaohe Lin <linmiaohe@huawei.com>
Sat, 23 Jul 2022 07:38:04 +0000 (15:38 +0800)
committerakpm <akpm@linux-foundation.org>
Sat, 30 Jul 2022 01:07:17 +0000 (18:07 -0700)
commit2727cfe4072a35ce813e3708f74c135de7da8897
tree52e42a1856a053caf26610bde55c01e610799ea5
parent360b420dbded8ad5b70a41de98e77354dd9e7d36
hugetlb_cgroup: fix wrong hugetlb cgroup numa stat

We forget to set cft->private for numa stat file.  As a result, numa stat
of hstates[0] is always showed for all hstates.  Encode the hstates index
into cft->private to fix this issue.

Link: https://lkml.kernel.org/r/20220723073804.53035-1-linmiaohe@huawei.com
Fixes: f47761999052 ("hugetlb: add hugetlb.*.numa_stat file")
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Acked-by: Muchun Song <songmuchun@bytedance.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Mina Almasry <almasrymina@google.com>
Cc: Shakeel Butt <shakeelb@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/hugetlb_cgroup.c