From 1255b1955a4cd467d934e36df27e7c1000f4a172 Mon Sep 17 00:00:00 2001 From: Mel Gorman Date: Wed, 12 Oct 2011 21:06:51 +0200 Subject: [PATCH] --- yaml --- r: 344776 b: refs/heads/master c: 4fd017708c4a067da51a2b5cf8aedddf4e840b1f h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/mm/huge_memory.c | 3 ++- trunk/mm/memory.c | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index a359f74f5887..94e15ecf0896 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8d1acce4537c4e2f5889ed9ba9b8eddb80d99820 +refs/heads/master: 4fd017708c4a067da51a2b5cf8aedddf4e840b1f diff --git a/trunk/mm/huge_memory.c b/trunk/mm/huge_memory.c index 40f17c34b415..35c66a269bcc 100644 --- a/trunk/mm/huge_memory.c +++ b/trunk/mm/huge_memory.c @@ -710,7 +710,8 @@ int do_huge_pmd_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma, * run pte_offset_map on the pmd, if an huge pmd could * materialize from under us from a different thread. */ - if (unlikely(__pte_alloc(mm, vma, pmd, address))) + if (unlikely(pmd_none(*pmd)) && + unlikely(__pte_alloc(mm, vma, pmd, address))) return VM_FAULT_OOM; /* if an huge pmd materialized from under us just retry later */ if (unlikely(pmd_trans_huge(*pmd))) diff --git a/trunk/mm/memory.c b/trunk/mm/memory.c index 221fc9ffcab1..7cf762857baa 100644 --- a/trunk/mm/memory.c +++ b/trunk/mm/memory.c @@ -3560,7 +3560,8 @@ int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma, * run pte_offset_map on the pmd, if an huge pmd could * materialize from under us from a different thread. */ - if (unlikely(pmd_none(*pmd)) && __pte_alloc(mm, vma, pmd, address)) + if (unlikely(pmd_none(*pmd)) && + unlikely(__pte_alloc(mm, vma, pmd, address))) return VM_FAULT_OOM; /* if an huge pmd materialized from under us just retry later */ if (unlikely(pmd_trans_huge(*pmd)))