Lines Matching refs:new_folio
918 struct folio *new_folio; in copy_present_page() local
921 new_folio = *prealloc; in copy_present_page()
922 if (!new_folio) in copy_present_page()
930 if (copy_mc_user_highpage(&new_folio->page, page, addr, src_vma)) in copy_present_page()
934 __folio_mark_uptodate(new_folio); in copy_present_page()
935 folio_add_new_anon_rmap(new_folio, dst_vma, addr, RMAP_EXCLUSIVE); in copy_present_page()
936 folio_add_lru_vma(new_folio, dst_vma); in copy_present_page()
940 pte = mk_pte(&new_folio->page, dst_vma->vm_page_prot); in copy_present_page()
1059 struct folio *new_folio; in folio_prealloc() local
1062 new_folio = vma_alloc_zeroed_movable_folio(vma, addr); in folio_prealloc()
1064 new_folio = vma_alloc_folio(GFP_HIGHUSER_MOVABLE, 0, vma, in folio_prealloc()
1067 if (!new_folio) in folio_prealloc()
1070 if (mem_cgroup_charge(new_folio, src_mm, GFP_KERNEL)) { in folio_prealloc()
1071 folio_put(new_folio); in folio_prealloc()
1074 folio_throttle_swaprate(new_folio, GFP_KERNEL); in folio_prealloc()
1076 return new_folio; in folio_prealloc()
3337 struct folio *new_folio = NULL; in wp_page_copy() local
3353 new_folio = folio_prealloc(mm, vma, vmf->address, pfn_is_zero); in wp_page_copy()
3354 if (!new_folio) in wp_page_copy()
3360 err = __wp_page_copy_user(&new_folio->page, vmf->page, vmf); in wp_page_copy()
3369 folio_put(new_folio); in wp_page_copy()
3376 kmsan_copy_page_meta(&new_folio->page, vmf->page); in wp_page_copy()
3379 __folio_mark_uptodate(new_folio); in wp_page_copy()
3401 entry = mk_pte(&new_folio->page, vma->vm_page_prot); in wp_page_copy()
3420 folio_add_new_anon_rmap(new_folio, vma, vmf->address, RMAP_EXCLUSIVE); in wp_page_copy()
3421 folio_add_lru_vma(new_folio, vma); in wp_page_copy()
3452 new_folio = old_folio; in wp_page_copy()
3462 if (new_folio) in wp_page_copy()
3463 folio_put(new_folio); in wp_page_copy()