diff options
Diffstat (limited to 'mm/hugetlb.c')
-rw-r--r-- | mm/hugetlb.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 96991ded82fe..c4a3558589ab 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c | |||
@@ -2448,8 +2448,11 @@ retry_avoidcopy: | |||
2448 | * When the original hugepage is shared one, it does not have | 2448 | * When the original hugepage is shared one, it does not have |
2449 | * anon_vma prepared. | 2449 | * anon_vma prepared. |
2450 | */ | 2450 | */ |
2451 | if (unlikely(anon_vma_prepare(vma))) | 2451 | if (unlikely(anon_vma_prepare(vma))) { |
2452 | /* Caller expects lock to be held */ | ||
2453 | spin_lock(&mm->page_table_lock); | ||
2452 | return VM_FAULT_OOM; | 2454 | return VM_FAULT_OOM; |
2455 | } | ||
2453 | 2456 | ||
2454 | copy_user_huge_page(new_page, old_page, address, vma); | 2457 | copy_user_huge_page(new_page, old_page, address, vma); |
2455 | __SetPageUptodate(new_page); | 2458 | __SetPageUptodate(new_page); |