summaryrefslogtreecommitdiffstats
path: root/mm/mempolicy.c
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2024-03-26 21:28:22 +0100
committerAndrew Morton <akpm@linux-foundation.org>2024-04-26 05:56:18 +0200
commit5beaee54a324ba1fe307e341ec825d5d099f4091 (patch)
treeec2b731c12b16589ccad98101de58594805006f2 /mm/mempolicy.c
parentsparc: use is_huge_zero_pmd() (diff)
downloadlinux-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/mempolicy.c')
-rw-r--r--mm/mempolicy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index 913cff5da5a3..5743028a63a5 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -510,7 +510,7 @@ static void queue_folios_pmd(pmd_t *pmd, struct mm_walk *walk)
return;
}
folio = pfn_folio(pmd_pfn(*pmd));
- if (is_huge_zero_page(&folio->page)) {
+ if (is_huge_zero_folio(folio)) {
walk->action = ACTION_CONTINUE;
return;
}