Kernel bump from 4.1.3-rt to 4.1.7-rt.
[kvmfornfv.git] / kernel / arch / arm64 / mm / hugetlbpage.c
index 2de9d2e..0eeb4f0 100644 (file)
@@ -40,13 +40,13 @@ int huge_pmd_unshare(struct mm_struct *mm, unsigned long *addr, pte_t *ptep)
 
 int pmd_huge(pmd_t pmd)
 {
-       return !(pmd_val(pmd) & PMD_TABLE_BIT);
+       return pmd_val(pmd) && !(pmd_val(pmd) & PMD_TABLE_BIT);
 }
 
 int pud_huge(pud_t pud)
 {
 #ifndef __PAGETABLE_PMD_FOLDED
-       return !(pud_val(pud) & PUD_TABLE_BIT);
+       return pud_val(pud) && !(pud_val(pud) & PUD_TABLE_BIT);
 #else
        return 0;
 #endif