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
325extern int set_pmd_migration_entry(struct page_vma_mapped_walk *pvmw,325extern int set_pmd_migration_entry(struct page_vma_mapped_walk *pvmw,
326 struct page *page);326 struct page *page);
327 327
328extern void remove_migration_pmd(struct page_vma_mapped_walk *pvmw,328void remove_migration_pmd(struct page_vma_mapped_walk *pvmw,
329 struct page *new);329 struct folio *folio);
330 330
331extern void pmd_migration_entry_wait(struct mm_struct *mm, pmd_t *pmd);331extern void pmd_migration_entry_wait(struct mm_struct *mm, pmd_t *pmd);
332 332
@@ -346,7 +346,7 @@ static inline int set_pmd_migration_entry(struct page_vma_mapped_walk *pvmw, · 13 unmodified lines
346}346}
347 347
348static inline void remove_migration_pmd(struct page_vma_mapped_walk *pvmw,348static inline void remove_migration_pmd(struct page_vma_mapped_walk *pvmw,
349 struct page *new)349 struct folio *folio)
350{350{
351 BUILD_BUG();351 BUILD_BUG();
352}352}