summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2025-08-05 20:23:00 +0300
committerAndrew Morton <akpm@linux-foundation.org>2025-09-14 02:55:09 +0300
commitc995ac3aa3747ec2a0373e5f319a22e0cb31d613 (patch)
tree98752fd2a80c595c7c575d709fc293b509ea55de /include/linux
parentbd0dbbb3fd902c7eea7eb166d91bda4530a8de96 (diff)
downloadlinux-c995ac3aa3747ec2a0373e5f319a22e0cb31d613.tar.xz
mm: reimplement folio_is_fsdax()
For callers of folio_is_fsdax(), we save a folio->page->folio conversion. Callers of is_fsdax_page() simply move the conversion of page->folio from the implementation of page_pgmap() to is_fsdax_page(). Link: https://lkml.kernel.org/r/20250805172307.1302730-11-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Zi Yan <ziy@nvidia.com> Cc: Shakeel Butt <shakeel.butt@linux.dev> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/memremap.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/linux/memremap.h b/include/linux/memremap.h
index 06d29794abe6..450d4bb6835c 100644
--- a/include/linux/memremap.h
+++ b/include/linux/memremap.h
@@ -188,15 +188,15 @@ static inline bool is_device_coherent_page(const struct page *page)
return folio_is_device_coherent(page_folio(page));
}
-static inline bool is_fsdax_page(const struct page *page)
+static inline bool folio_is_fsdax(const struct folio *folio)
{
- return is_zone_device_page(page) &&
- page_pgmap(page)->type == MEMORY_DEVICE_FS_DAX;
+ return folio_is_zone_device(folio) &&
+ folio->pgmap->type == MEMORY_DEVICE_FS_DAX;
}
-static inline bool folio_is_fsdax(const struct folio *folio)
+static inline bool is_fsdax_page(const struct page *page)
{
- return is_fsdax_page(&folio->page);
+ return folio_is_fsdax(page_folio(page));
}
#ifdef CONFIG_ZONE_DEVICE