diff --git a/[refs] b/[refs] index 539200ad64b4..8183bc6004da 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5f8aefd44e64ed2f6950a1dcc77309b7dd9979f4 +refs/heads/master: a734bcc812146cfba530e1adaf609fce1357982e diff --git a/trunk/mm/hugetlb.c b/trunk/mm/hugetlb.c index 7acd12503f73..2c551b28ba69 100644 --- a/trunk/mm/hugetlb.c +++ b/trunk/mm/hugetlb.c @@ -2408,7 +2408,14 @@ static int hugetlb_cow(struct mm_struct *mm, struct vm_area_struct *vma, BUG_ON(page_count(old_page) != 1); BUG_ON(huge_pte_none(pte)); spin_lock(&mm->page_table_lock); - goto retry_avoidcopy; + ptep = huge_pte_offset(mm, address & huge_page_mask(h)); + if (likely(pte_same(huge_ptep_get(ptep), pte))) + goto retry_avoidcopy; + /* + * race occurs while re-acquiring page_table_lock, and + * our job is done. + */ + return 0; } WARN_ON_ONCE(1); }