X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=mm%2Fhugetlb.c;h=908f01d9f82b2e631ec244bb0e25644830f8a91a;hb=a592f46075d79ff7348e624e7d871dca730e70f2;hp=68aff087d4415e12fc9ef66cd7a9bcbcd1686041;hpb=fec8ddd2a735a9e20845a057227ab37eb634e7ea;p=pandora-kernel.git diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 68aff087d441..908f01d9f82b 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -2819,12 +2819,12 @@ int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma, } else if (unlikely(is_hugetlb_entry_hwpoisoned(entry))) return VM_FAULT_HWPOISON_LARGE | VM_FAULT_SET_HINDEX(h - hstates); + } else { + ptep = huge_pte_alloc(mm, address, huge_page_size(h)); + if (!ptep) + return VM_FAULT_OOM; } - ptep = huge_pte_alloc(mm, address, huge_page_size(h)); - if (!ptep) - return VM_FAULT_OOM; - /* * Serialize hugepage allocation and instantiation, so that we don't * get spurious allocation failures if two CPUs race to instantiate