aboutsummaryrefslogtreecommitdiff
path: root/mm/swap.c
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle)2024-04-05 16:32:27 +0100
committerAndrew Morton2024-04-25 20:56:44 -0700
commit9f100e3b37590828ae23b0210ee634d14b28b8e8 (patch)
tree18da8c0270f6ef2122375fb821e1a1827fe03353 /mm/swap.c
parent79a48287515848c18a49d75c1fdf176c82bb13cf (diff)
mm: convert free_zone_device_page to free_zone_device_folio
Both callers already have a folio; pass it in and save a few calls to compound_head(). Link: https://lkml.kernel.org/r/20240405153228.2563754-6-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Zi Yan <ziy@nvidia.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/swap.c')
-rw-r--r--mm/swap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/swap.c b/mm/swap.c
index 4f3964c983d8..8ae5cd4ed180 100644
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -115,7 +115,7 @@ static void page_cache_release(struct folio *folio)
void __folio_put(struct folio *folio)
{
if (unlikely(folio_is_zone_device(folio))) {
- free_zone_device_page(&folio->page);
+ free_zone_device_folio(folio);
return;
} else if (folio_test_hugetlb(folio)) {
free_huge_folio(folio);
@@ -983,7 +983,7 @@ void folios_put_refs(struct folio_batch *folios, unsigned int *refs)
if (put_devmap_managed_page_refs(&folio->page, nr_refs))
continue;
if (folio_ref_sub_and_test(folio, nr_refs))
- free_zone_device_page(&folio->page);
+ free_zone_device_folio(folio);
continue;
}