aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/hugetlb.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index e0fda156f021..db861d8b6c28 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -699,6 +699,11 @@ int copy_hugetlb_page_range(struct mm_struct *dst, struct mm_struct *src,
699 dst_pte = huge_pte_alloc(dst, addr); 699 dst_pte = huge_pte_alloc(dst, addr);
700 if (!dst_pte) 700 if (!dst_pte)
701 goto nomem; 701 goto nomem;
702
703 /* If the pagetables are shared don't copy or take references */
704 if (dst_pte == src_pte)
705 continue;
706
702 spin_lock(&dst->page_table_lock); 707 spin_lock(&dst->page_table_lock);
703 spin_lock(&src->page_table_lock); 708 spin_lock(&src->page_table_lock);
704 if (!pte_none(*src_pte)) { 709 if (!pte_none(*src_pte)) {