hugetlb, rmap: use hugepage_add_new_anon_rmap() in hugetlb_cow()
Obviously, setting anon_vma for COWed hugepage should be done by hugepage_add_new_anon_rmap() to scan vmas faster. This patch fixes it. Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> Acked-by: Andrea Arcangeli <aarcange@redhat.com> Reviewed-by: Rik van Riel <riel@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
433abed6c6
commit
cd67f0d2a9
|
@ -2404,7 +2404,7 @@ retry_avoidcopy:
|
|||
set_huge_pte_at(mm, address, ptep,
|
||||
make_huge_pte(vma, new_page, 1));
|
||||
page_remove_rmap(old_page);
|
||||
hugepage_add_anon_rmap(new_page, vma, address);
|
||||
hugepage_add_new_anon_rmap(new_page, vma, address);
|
||||
/* Make the old page be freed below */
|
||||
new_page = old_page;
|
||||
mmu_notifier_invalidate_range_end(mm,
|
||||
|
|
Loading…
Reference in New Issue