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/20220504182857.4013401-26-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
Matthew Wilcox (Oracle) 2022-05-12 20:23:05 -07:00 committed by Andrew Morton
parent a9595b305c
commit 8b463be3a0

View file

@ -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);