]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - mm/huge_memory.c
Merge branch 'numa/misc'
[karo-tx-linux.git] / mm / huge_memory.c
index e62d3c5c5586bcf3a10575e78862e687b2755072..c58a5f05f39949634e794d5229e91b34fda779a8 100644 (file)
@@ -711,7 +711,8 @@ out:
         * 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)))