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

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

Link: https://lkml.kernel.org/r/20230606062013.2947002-3-zhangpeng362@huawei.com
Signed-off-by: ZhangPeng <zhangpeng362@huawei.com>
Suggested-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Muchun Song <songmuchun@bytedance.com>
Reviewed-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>
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