The patch titled Subject: mm/thp: fix collapse_file()'s try_to_unmap(folio,) has been added to the -mm tree. Its filename is mm-thp-fix-collapse_files-try_to_unmapfolio.patch This patch should soon appear at https://ozlabs.org/~akpm/mmots/broken-out/mm-thp-fix-collapse_files-try_to_unmapfolio.patch and later at https://ozlabs.org/~akpm/mmotm/broken-out/mm-thp-fix-collapse_files-try_to_unmapfolio.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: Hugh Dickins <hughd@xxxxxxxxxx> Subject: mm/thp: fix collapse_file()'s try_to_unmap(folio,) The foliation of THP collapse_file()'s call to try_to_unmap() is currently wrong, crashing on a test in rmap_walk() when xas_next() delivered a value (after which page has been loaded independently). Link: https://lkml.kernel.org/r/3f187b6c-e5e8-e66d-e0c0-7455ca6abb4c@xxxxxxxxxx Fixes: c3b522d9a698 ("mm/rmap: Convert try_to_unmap() to take a folio") Signed-off-by: Hugh Dickins <hughd@xxxxxxxxxx> Cc: Matthew Wilcox <willy@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/khugepaged.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/mm/khugepaged.c~mm-thp-fix-collapse_files-try_to_unmapfolio +++ a/mm/khugepaged.c @@ -1835,7 +1835,8 @@ static void collapse_file(struct mm_stru } if (page_mapped(page)) - try_to_unmap(folio, TTU_IGNORE_MLOCK | TTU_BATCH_FLUSH); + try_to_unmap(page_folio(page), + TTU_IGNORE_MLOCK | TTU_BATCH_FLUSH); xas_lock_irq(&xas); xas_set(&xas, index); _ Patches currently in -mm which might be from hughd@xxxxxxxxxx are memfd-fix-f_seal_write-after-shmem-huge-page-allocated.patch tmpfs-support-for-file-creation-time-fix.patch mm-thp-fix-collapse_files-try_to_unmapfolio.patch mm-migrate-fix-remove_migration_pte-of-hugetlb-entry.patch