aboutsummaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorGravatar Matthew Wilcox (Oracle) <willy@infradead.org> 2024-03-26 20:28:22 +0000
committerGravatar Andrew Morton <akpm@linux-foundation.org> 2024-04-25 20:56:18 -0700
commit5beaee54a324ba1fe307e341ec825d5d099f4091 (patch)
treeec2b731c12b16589ccad98101de58594805006f2 /fs
parentsparc: use is_huge_zero_pmd() (diff)
downloadlinux-5beaee54a324ba1fe307e341ec825d5d099f4091.tar.gz
linux-5beaee54a324ba1fe307e341ec825d5d099f4091.tar.bz2
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 'fs')
-rw-r--r--fs/proc/page.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/proc/page.c b/fs/proc/page.c
index 05120263af2a..2fb64bdb64eb 100644
--- a/fs/proc/page.c
+++ b/fs/proc/page.c
@@ -155,7 +155,7 @@ u64 stable_page_flags(const struct page *page)
else if (folio_test_large(folio)) {
if ((k & (1 << PG_lru)) || is_anon)
u |= 1 << KPF_THP;
- else if (is_huge_zero_page(&folio->page)) {
+ else if (is_huge_zero_folio(folio)) {
u |= 1 << KPF_ZERO_PAGE;
u |= 1 << KPF_THP;
}