aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVishal Moola (Oracle) <[email protected]>2023-06-13 19:13:08 -0700
committerAndrew Morton <[email protected]>2023-06-19 16:19:34 -0700
commit708ff4914dfb410761227a219c17c3e9dbd68c05 (patch)
tree826a3aeced728b7dd9d33a4fa66785b3dd7250e6
parent452c03fdbed0d19f907c877a6a9edd226b1ebad9 (diff)
mmzone: introduce folio_is_zone_movable()
Patch series "Replace is_longterm_pinnable_page()", v2. This patchset introduces some more helper functions for the folio conversions, and converts all callers of is_longterm_pinnable_page() to use folios. This patch (of 5): Introduce folio_is_zone_movable() to act as a folio equivalent for is_zone_movable_page(). This is to assist in later folio conversions. Link: https://lkml.kernel.org/r/[email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Vishal Moola (Oracle) <[email protected]> Reviewed-by: Matthew Wilcox (Oracle) <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
-rw-r--r--include/linux/mmzone.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index 5a7ada0413da..f10902491ead 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -1116,6 +1116,11 @@ static inline bool is_zone_movable_page(const struct page *page)
{
return page_zonenum(page) == ZONE_MOVABLE;
}
+
+static inline bool folio_is_zone_movable(const struct folio *folio)
+{
+ return folio_zonenum(folio) == ZONE_MOVABLE;
+}
#endif
/*