On Wed, Apr 03, 2024 at 06:18:33PM +0100, Matthew Wilcox (Oracle) wrote: > Simplify the body of __collapse_huge_page_copy() while I'm looking at > it. > > Signed-off-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx> This makes things so much easier to read! Reviewed-by: Vishal Moola (Oracle) <vishal.moola@xxxxxxxxx> > } > @@ -1196,7 +1192,7 @@ static int collapse_huge_page(struct mm_struct *mm, unsigned long address, > */ > anon_vma_unlock_write(vma->anon_vma); > > - result = __collapse_huge_page_copy(pte, &folio->page, pmd, _pmd, > + result = __collapse_huge_page_copy(pte, folio, pmd, _pmd, > vma, address, pte_ptl, > &compound_pagelist); Additionally, it looks like if you put this after patch 2 and before 3, you could avoid modifying this line twice.