summaryrefslogtreecommitdiffstats
path: root/mm/migrate.c
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2022-01-29 16:06:53 -0500
committerMatthew Wilcox (Oracle) <willy@infradead.org>2022-03-21 13:01:35 -0400
commit2f031c6f042cb8a9b221a8b6b80e69de5170f830 (patch)
treeb07b43d1a1f74fe3552e0cd08bafdf11bde6b1a9 /mm/migrate.c
parente05b34539d008ab819388f699b25eae962ba24ac (diff)
downloadlinux-2f031c6f042cb8a9b221a8b6b80e69de5170f830.tar.gz
linux-2f031c6f042cb8a9b221a8b6b80e69de5170f830.tar.bz2
linux-2f031c6f042cb8a9b221a8b6b80e69de5170f830.zip
mm/rmap: Convert rmap_walk() to take a folio
This ripples all the way through to every calling and called function from rmap. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Diffstat (limited to 'mm/migrate.c')
-rw-r--r--mm/migrate.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/mm/migrate.c b/mm/migrate.c
index eba3cd5376e3..2defe9aa4d0e 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -171,13 +171,11 @@ void putback_movable_pages(struct list_head *l)
/*
* Restore a potential migration pte to a working pte entry
*/
-static bool remove_migration_pte(struct page *page, struct vm_area_struct *vma,
- unsigned long addr, void *old)
+static bool remove_migration_pte(struct folio *folio,
+ struct vm_area_struct *vma, unsigned long addr, void *old)
{
- struct folio *folio = page_folio(page);
DEFINE_FOLIO_VMA_WALK(pvmw, old, vma, addr, PVMW_SYNC | PVMW_MIGRATION);
- VM_BUG_ON_PAGE(PageTail(page), page);
while (page_vma_mapped_walk(&pvmw)) {
pte_t pte;
swp_entry_t entry;
@@ -269,9 +267,9 @@ void remove_migration_ptes(struct folio *src, struct folio *dst, bool locked)
};
if (locked)
- rmap_walk_locked(&dst->page, &rwc);
+ rmap_walk_locked(dst, &rwc);
else
- rmap_walk(&dst->page, &rwc);
+ rmap_walk(dst, &rwc);
}
/*