]> git.baikalelectronics.ru Git - kernel.git/commit
hugetlb_cgroup: use helper pages_per_huge_page() in hugetlb_cgroup
authorMiaohe Lin <linmiaohe@huawei.com>
Wed, 24 Feb 2021 20:07:36 +0000 (12:07 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 24 Feb 2021 21:38:33 +0000 (13:38 -0800)
commit9381bdf3ece808e0443f1475ce2924f6bba5cc98
tree531d73a2a6601b1c191c1eda9bd12f892627fd88
parentea0b658700c172783d3a05bd11663f038a84d78c
hugetlb_cgroup: use helper pages_per_huge_page() in hugetlb_cgroup

We could use helper function pages_per_huge_page() to get the number of
pages in a hstate to simplify the code slightly.

Link: https://lkml.kernel.org/r/20210205084513.29624-1-linmiaohe@huawei.com
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/hugetlb_cgroup.c