History

mm/huge_memory: update remove_migration_pmd() to accept a folio

This function does not need to accept a page and requiring it to is unnecessary and misleading. make_[writable, readable]_device_private_entry() must be passed a PMD-aligned PFN as they immediately used to obtain a softleaf PMD entry and the same argument applies to folio_add_[anon, file]_rmap_pmd(). While we are here, update a VM_BUG_ON() to a VM_WARN_ON_ONCE(). No functional change intended.

Lorenzo Stoakes (ARM) committed 3 months ago

Commit 8e658ec1 parent e7006fb3 files · +11 −13Browse files

Showing the changes to include (1 of 3 files). Show all

Unified · Split

include/linux/swapops.h+3−3
@@ -325,8 +325,8 @@ struct page_vma_mapped_walk; · 324 unmodified lines
325325 extern int set_pmd_migration_entry(struct page_vma_mapped_walk *pvmw,
326326 struct page *page);
327327
328−extern void remove_migration_pmd(struct page_vma_mapped_walk *pvmw,
329− struct page *new);
328+void remove_migration_pmd(struct page_vma_mapped_walk *pvmw,
329+ struct folio *folio);
330330
331331 extern void pmd_migration_entry_wait(struct mm_struct *mm, pmd_t *pmd);
332332
@@ -346,7 +346,7 @@ static inline int set_pmd_migration_entry(struct page_vma_mapped_walk *pvmw, · 13 unmodified lines
346346 }
347347
348348 static inline void remove_migration_pmd(struct page_vma_mapped_walk *pvmw,
349− struct page *new)
349+ struct folio *folio)
350350 {
351351 BUILD_BUG();
352352 }