mm/hugetlb: use a folio in copy_hugetlb_page_range()
authorZhangPeng <zhangpeng362@huawei.com>
Tue, 6 Jun 2023 06:20:11 +0000 (14:20 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 19 Jun 2023 23:19:03 +0000 (16:19 -0700)
commitad27ce206af731f6854b3d8a1760c573b217e363
tree72e447b02e5e32c6f46bad3b83d8a94cc45f5366
parent9fc96c7c19dfab67bf81b25fbc4f49b7752d5060
mm/hugetlb: use a folio in copy_hugetlb_page_range()

Patch series "Convert several functions in hugetlb.c to use a folio", v2.

This patch series converts three functions in hugetlb.c to use a folio,
which can remove several implicit calls to compound_head().

This patch (of 3):

We can replace five implict calls to compound_head() with one by using
pte_folio.  The page we get back is always a head page, so we just convert
ptepage to pte_folio.

Link: https://lkml.kernel.org/r/20230606062013.2947002-1-zhangpeng362@huawei.com
Link: https://lkml.kernel.org/r/20230606062013.2947002-2-zhangpeng362@huawei.com
Signed-off-by: ZhangPeng <zhangpeng362@huawei.com>
Suggested-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Muchun Song <songmuchun@bytedance.com>
Reviewed-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>
Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Nanyong Sun <sunnanyong@huawei.com>
Cc: Vishal Moola (Oracle) <vishal.moola@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/hugetlb.c