aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <[email protected]>2022-05-12 20:23:05 -0700
committerAndrew Morton <[email protected]>2022-05-13 07:20:17 -0700
commit8b463be3a0241558071e6ba9bf11e4bf42ccc856 (patch)
treecef07caaf52c10b48bfd45e262e99c71082652e1
parenta9595b305c0f6cbbf9505325509d95637f6a7062 (diff)
mm: add folio_test_movable()
This is the folio equivalent of PageMovable() which is needed to convert mm/migrate.c to folios. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Matthew Wilcox (Oracle) <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
-rw-r--r--include/linux/migrate.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/migrate.h b/include/linux/migrate.h
index 2707bfd43a0d..069a89e847f3 100644
--- a/include/linux/migrate.h
+++ b/include/linux/migrate.h
@@ -105,6 +105,11 @@ static inline void __ClearPageMovable(struct page *page)
}
#endif
+static inline bool folio_test_movable(struct folio *folio)
+{
+ return PageMovable(&folio->page);
+}
+
#ifdef CONFIG_NUMA_BALANCING
extern int migrate_misplaced_page(struct page *page,
struct vm_area_struct *vma, int node);