summaryrefslogtreecommitdiffstats
path: root/kernel/arch/arm64/mm
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/arch/arm64/mm')
-rw-r--r--kernel/arch/arm64/mm/hugetlbpage.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/arch/arm64/mm/hugetlbpage.c b/kernel/arch/arm64/mm/hugetlbpage.c
index 2de9d2e59..0eeb4f093 100644
--- a/kernel/arch/arm64/mm/hugetlbpage.c
+++ b/kernel/arch/arm64/mm/hugetlbpage.c
@@ -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