From: Naoya Horiguchi Date: Fri, 10 Sep 2010 04:23:04 +0000 (+0900) Subject: hugetlb, rmap: use hugepage_add_new_anon_rmap() in hugetlb_cow() X-Git-Tag: v5.15~27924 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=cd67f0d2a9a6b5b9f79f4343dc8805757d9ebae2;p=mirror_ubuntu-kernels.git 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 Acked-by: Andrea Arcangeli Reviewed-by: Rik van Riel Signed-off-by: Linus Torvalds --- diff --git a/mm/hugetlb.c b/mm/hugetlb.c index cc5be788a39f..9519f3f6c1da 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -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,