The patch titled Subject: mm/migrate.c: make putback_movable_page() static has been added to the -mm tree. Its filename is mm-migratec-make-putback_movable_page-static.patch This patch should soon appear at https://ozlabs.org/~akpm/mmots/broken-out/mm-migratec-make-putback_movable_page-static.patch and later at https://ozlabs.org/~akpm/mmotm/broken-out/mm-migratec-make-putback_movable_page-static.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Miaohe Lin <linmiaohe@xxxxxxxxxx> Subject: mm/migrate.c: make putback_movable_page() static Patch series "Cleanup and fixup for mm/migrate.c", v3. This series contains cleanups to remove unnecessary VM_BUG_ON_PAGE and rc != MIGRATEPAGE_SUCCESS check. Also use helper function to remove some duplicated codes. What's more, this fixes potential deadlock in NUMA balancing shared exec THP case and so on. More details can be found in the respective changelogs. This patch (of 5): The putback_movable_page() is just called by putback_movable_pages() and we know the page is locked and both PageMovable() and PageIsolated() is checked right before calling putback_movable_page(). So we make it static and remove all the 3 VM_BUG_ON_PAGE(). Link: https://lkml.kernel.org/r/20210325131524.48181-1-linmiaohe@xxxxxxxxxx Link: https://lkml.kernel.org/r/20210325131524.48181-2-linmiaohe@xxxxxxxxxx Signed-off-by: Miaohe Lin <linmiaohe@xxxxxxxxxx> Reviewed-by: David Hildenbrand <david@xxxxxxxxxx> Reviewed-by: Yang Shi <shy828301@xxxxxxxxx> Cc: Jerome Glisse <jglisse@xxxxxxxxxx> Cc: Rafael Aquini <aquini@xxxxxxxxxx> Cc: Alistair Popple <apopple@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- include/linux/migrate.h | 1 - mm/migrate.c | 7 +------ 2 files changed, 1 insertion(+), 7 deletions(-) --- a/include/linux/migrate.h~mm-migratec-make-putback_movable_page-static +++ a/include/linux/migrate.h @@ -43,7 +43,6 @@ extern int migrate_pages(struct list_hea unsigned long private, enum migrate_mode mode, int reason); extern struct page *alloc_migration_target(struct page *page, unsigned long private); extern int isolate_movable_page(struct page *page, isolate_mode_t mode); -extern void putback_movable_page(struct page *page); extern void migrate_page_states(struct page *newpage, struct page *page); extern void migrate_page_copy(struct page *newpage, struct page *page); --- a/mm/migrate.c~mm-migratec-make-putback_movable_page-static +++ a/mm/migrate.c @@ -118,15 +118,10 @@ out: return -EBUSY; } -/* It should be called on page which is PG_movable */ -void putback_movable_page(struct page *page) +static void putback_movable_page(struct page *page) { struct address_space *mapping; - VM_BUG_ON_PAGE(!PageLocked(page), page); - VM_BUG_ON_PAGE(!PageMovable(page), page); - VM_BUG_ON_PAGE(!PageIsolated(page), page); - mapping = page_mapping(page); mapping->a_ops->putback_page(page); __ClearPageIsolated(page); _ Patches currently in -mm which might be from linmiaohe@xxxxxxxxxx are mm-hugetlb-remove-redundant-reservation-check-condition-in-alloc_huge_page.patch mm-hugetlb-use-some-helper-functions-to-cleanup-code.patch mm-hugetlb-optimize-the-surplus-state-transfer-code-in-move_hugetlb_state.patch hugetlb_cgroup-remove-unnecessary-vm_bug_on_page-in-hugetlb_cgroup_migrate.patch mm-hugetlb-simplify-the-code-when-alloc_huge_page-failed-in-hugetlb_no_page.patch mm-hugetlb-avoid-calculating-fault_mutex_hash-in-truncate_op-case.patch khugepaged-remove-unneeded-return-value-of-khugepaged_collapse_pte_mapped_thps.patch khugepaged-reuse-the-smp_wmb-inside-__setpageuptodate.patch khugepaged-use-helper-khugepaged_test_exit-in-__khugepaged_enter.patch khugepaged-fix-wrong-result-value-for-trace_mm_collapse_huge_page_isolate.patch mm-huge_memoryc-remove-unnecessary-local-variable-ret2.patch mm-huge_memoryc-rework-the-function-vma_adjust_trans_huge.patch mm-huge_memoryc-make-get_huge_zero_page-return-bool.patch mm-huge_memoryc-rework-the-function-do_huge_pmd_numa_page-slightly.patch mm-huge_memoryc-remove-redundant-pagecompound-check.patch mm-huge_memoryc-remove-unused-macro-transparent_hugepage_debug_cow_flag.patch mm-huge_memoryc-use-helper-function-migration_entry_to_page.patch khugepaged-use-helper-function-range_in_vma-in-collapse_pte_mapped_thp.patch khugepaged-remove-unnecessary-out-label-in-collapse_huge_page.patch khugepaged-remove-meaningless-pte_present-check-in-khugepaged_scan_pmd.patch mm-migratec-make-putback_movable_page-static.patch mm-migratec-remove-unnecessary-rc-=-migratepage_success-check-in-else-case.patch mm-migratec-fix-potential-indeterminate-pte-entry-in-migrate_vma_insert_page.patch mm-migratec-use-helper-migrate_vma_collect_skip-in-migrate_vma_collect_hole.patch revert-mm-migrate-skip-shared-exec-thp-for-numa-balancing.patch