diff options
Diffstat (limited to 'mm/hugetlb.c')
-rw-r--r-- | mm/hugetlb.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 7acd12503f73..2c551b28ba69 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c | |||
@@ -2408,7 +2408,14 @@ retry_avoidcopy: | |||
2408 | BUG_ON(page_count(old_page) != 1); | 2408 | BUG_ON(page_count(old_page) != 1); |
2409 | BUG_ON(huge_pte_none(pte)); | 2409 | BUG_ON(huge_pte_none(pte)); |
2410 | spin_lock(&mm->page_table_lock); | 2410 | spin_lock(&mm->page_table_lock); |
2411 | goto retry_avoidcopy; | 2411 | ptep = huge_pte_offset(mm, address & huge_page_mask(h)); |
2412 | if (likely(pte_same(huge_ptep_get(ptep), pte))) | ||
2413 | goto retry_avoidcopy; | ||
2414 | /* | ||
2415 | * race occurs while re-acquiring page_table_lock, and | ||
2416 | * our job is done. | ||
2417 | */ | ||
2418 | return 0; | ||
2412 | } | 2419 | } |
2413 | WARN_ON_ONCE(1); | 2420 | WARN_ON_ONCE(1); |
2414 | } | 2421 | } |