]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm/hugetlb: fix incorrect update of max_huge_pages
authorMiaohe Lin <linmiaohe@huawei.com>
Tue, 16 Aug 2022 13:05:48 +0000 (21:05 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 22 Aug 2022 22:58:04 +0000 (15:58 -0700)
commitf73507d490d5f4ef4f0392b6a8ad42cffaabf1cf
tree6848719bffb1e76c8a9f6dffb8710061a8ab10f5
parent6e1d9e170432262c9bddf4e75b6eb4bdb8e025ac
mm/hugetlb: fix incorrect update of max_huge_pages

Patch series "A few fixup patches for hugetlb".

This series contains a few fixup patches to fix incorrect update of
max_huge_pages, fix WARN_ON(!kobj) in sysfs_create_group() and so on.
More details can be found in the respective changelogs.

This patch (of 6):

There should be pages_per_huge_page(h) /
pages_per_huge_page(target_hstate) pages incremented for
target_hstate->max_huge_pages when page is demoted.  Update max_huge_pages
accordingly for consistency.

Link: https://lkml.kernel.org/r/20220816130553.31406-1-linmiaohe@huawei.com
Link: https://lkml.kernel.org/r/20220816130553.31406-2-linmiaohe@huawei.com
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Reviewed-by: Muchun Song <songmuchun@bytedance.com>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/hugetlb.c