summaryrefslogtreecommitdiffstats
path: root/mm/migrate.c
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2022-02-03 09:06:08 -0500
committerMatthew Wilcox (Oracle) <willy@infradead.org>2022-03-21 12:59:02 -0400
commiteed05e54d275b3cfc5d8c79843c5276a5878e94a (patch)
treeec7411a6713c845154731e0cd66a55adc501e792 /mm/migrate.c
parentf087b903fc2e4975bff9742a66ee7a837a2f545b (diff)
downloadlinux-eed05e54d275b3cfc5d8c79843c5276a5878e94a.tar.gz
linux-eed05e54d275b3cfc5d8c79843c5276a5878e94a.tar.bz2
linux-eed05e54d275b3cfc5d8c79843c5276a5878e94a.zip
mm: Add DEFINE_PAGE_VMA_WALK and DEFINE_FOLIO_VMA_WALK
Instead of declaring a struct page_vma_mapped_walk directly, use these helpers to allow us to transition to a PFN approach in the following patches. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Diffstat (limited to 'mm/migrate.c')
-rw-r--r--mm/migrate.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/mm/migrate.c b/mm/migrate.c
index f4076093c855..71f92e8ed934 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -174,12 +174,7 @@ void putback_movable_pages(struct list_head *l)
static bool remove_migration_pte(struct page *page, struct vm_area_struct *vma,
unsigned long addr, void *old)
{
- struct page_vma_mapped_walk pvmw = {
- .page = old,
- .vma = vma,
- .address = addr,
- .flags = PVMW_SYNC | PVMW_MIGRATION,
- };
+ DEFINE_PAGE_VMA_WALK(pvmw, old, vma, addr, PVMW_SYNC | PVMW_MIGRATION);
struct page *new;
pte_t pte;
swp_entry_t entry;