diff options
-rw-r--r-- | mm/memory.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/memory.c b/mm/memory.c index ce22a250926f..607098d47e74 100644 --- a/mm/memory.c +++ b/mm/memory.c | |||
@@ -3396,7 +3396,7 @@ int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma, | |||
3396 | * run pte_offset_map on the pmd, if an huge pmd could | 3396 | * run pte_offset_map on the pmd, if an huge pmd could |
3397 | * materialize from under us from a different thread. | 3397 | * materialize from under us from a different thread. |
3398 | */ | 3398 | */ |
3399 | if (unlikely(__pte_alloc(mm, vma, pmd, address))) | 3399 | if (unlikely(pmd_none(*pmd)) && __pte_alloc(mm, vma, pmd, address)) |
3400 | return VM_FAULT_OOM; | 3400 | return VM_FAULT_OOM; |
3401 | /* if an huge pmd materialized from under us just retry later */ | 3401 | /* if an huge pmd materialized from under us just retry later */ |
3402 | if (unlikely(pmd_trans_huge(*pmd))) | 3402 | if (unlikely(pmd_trans_huge(*pmd))) |