The quilt patch titled Subject: ksm: use a folio in replace_page() has been removed from the -mm tree. Its filename was ksm-use-a-folio-in-replace_page.patch This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm ------------------------------------------------------ From: "Matthew Wilcox (Oracle)" <willy@xxxxxxxxxxxxx> Subject: ksm: use a folio in replace_page() Date: Fri, 2 Sep 2022 20:46:41 +0100 Replace three calls to compound_head() with one. Link: https://lkml.kernel.org/r/20220902194653.1739778-46-willy@xxxxxxxxxxxxx Signed-off-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/ksm.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) --- a/mm/ksm.c~ksm-use-a-folio-in-replace_page +++ a/mm/ksm.c @@ -1110,6 +1110,7 @@ static int replace_page(struct vm_area_s struct page *kpage, pte_t orig_pte) { struct mm_struct *mm = vma->vm_mm; + struct folio *folio; pmd_t *pmd; pmd_t pmde; pte_t *ptep; @@ -1178,10 +1179,11 @@ static int replace_page(struct vm_area_s ptep_clear_flush(vma, addr, ptep); set_pte_at_notify(mm, addr, ptep, newpte); + folio = page_folio(page); page_remove_rmap(page, vma, false); - if (!page_mapped(page)) - try_to_free_swap(page); - put_page(page); + if (!folio_mapped(folio)) + folio_free_swap(folio); + folio_put(folio); pte_unmap_unlock(ptep, ptl); err = 0; _ Patches currently in -mm which might be from willy@xxxxxxxxxxxxx are