On Thu, Mar 30, 2023 at 09:40:44PM +0800, Peng Zhang wrote:
+void copy_user_folio(struct folio *dst, struct folio *src,Do we really want to pass in pages_per_huge_page here? We can get
+ unsigned long addr_hint,
+ struct vm_area_struct *vma,
+ unsigned int pages_per_huge_page);
that from folio_nr_pages(dst).
+++ b/mm/hugetlb.cThis function should be converted to s/ptepage/pte_folio/, but that's
@@ -5097,8 +5097,8 @@ int copy_hugetlb_page_range(struct mm_struct *dst, struct mm_struct *src,
ret = PTR_ERR(new_folio);
break;
}
- copy_user_huge_page(&new_folio->page, ptepage, addr, dst_vma,
- npages);
+ copy_user_folio(new_folio, page_folio(ptepage), addr, dst_vma,
+ npages);
put_page(ptepage);
not for this patch series.
- copy_user_huge_page(&new_folio->page, old_page, address, vma,Likewise for s/old_page/old_folio/
- pages_per_huge_page(h));
+ copy_user_folio(new_folio, page_folio(old_page), address, vma,
+ pages_per_huge_page(h));