mm: use pfn_swap_entry_to_folio() in zap_huge_pmd()
authorKefeng Wang <wangkefeng.wang@huawei.com>
Thu, 11 Jan 2024 15:24:25 +0000 (15:24 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 22 Feb 2024 00:00:03 +0000 (16:00 -0800)
commit0103b27a6b826729dc1500d013e53ebed48980b3
tree545ccec46e35fdd3a49019391156bb4b89de6842
parent439992ff4637ad5042ca8ee1f659fae24890de3e
mm: use pfn_swap_entry_to_folio() in zap_huge_pmd()

Call pfn_swap_entry_to_folio() in zap_huge_pmd() as preparation for
converting mm counter functions to take a folio.  Saves a call to
compound_head() embedded inside PageAnon().

Link: https://lkml.kernel.org/r/20240111152429.3374566-7-willy@infradead.org
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: David Hildenbrand <david@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/huge_memory.c