diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2024-03-26 21:28:22 +0100 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2024-04-26 05:56:18 +0200 |
commit | 5beaee54a324ba1fe307e341ec825d5d099f4091 (patch) | |
tree | ec2b731c12b16589ccad98101de58594805006f2 /mm/swap.c | |
parent | sparc: use is_huge_zero_pmd() (diff) | |
download | linux-5beaee54a324ba1fe307e341ec825d5d099f4091.tar.xz linux-5beaee54a324ba1fe307e341ec825d5d099f4091.zip |
mm: add is_huge_zero_folio()
This is the folio equivalent of is_huge_zero_page(). It doesn't add any
efficiency, but it does prevent the caller from passing a tail page and
getting confused when the predicate returns false.
Link: https://lkml.kernel.org/r/20240326202833.523759-3-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/swap.c')
-rw-r--r-- | mm/swap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/swap.c b/mm/swap.c index 500a09a48dfd..f72364e92d5f 100644 --- a/mm/swap.c +++ b/mm/swap.c @@ -985,7 +985,7 @@ void folios_put_refs(struct folio_batch *folios, unsigned int *refs) struct folio *folio = folios->folios[i]; unsigned int nr_refs = refs ? refs[i] : 1; - if (is_huge_zero_page(&folio->page)) + if (is_huge_zero_folio(folio)) continue; if (folio_is_zone_device(folio)) { |