]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/s390/lib/uaccess_pt.c
[S390] 4level-fixup cleanup
[linux-2.6-omap-h63xx.git] / arch / s390 / lib / uaccess_pt.c
index dc37ea827f4e329ebb031cab0eae458f38447c73..7e8efaade2ea1196275dd294ec8b48d2748899d3 100644 (file)
 static inline pte_t *follow_table(struct mm_struct *mm, unsigned long addr)
 {
        pgd_t *pgd;
+       pud_t *pud;
        pmd_t *pmd;
 
        pgd = pgd_offset(mm, addr);
        if (pgd_none(*pgd) || unlikely(pgd_bad(*pgd)))
                return NULL;
 
-       pmd = pmd_offset(pgd, addr);
+       pud = pud_offset(pgd, addr);
+       if (pud_none(*pud) || unlikely(pud_bad(*pud)))
+               return NULL;
+
+       pmd = pmd_offset(pud, addr);
        if (pmd_none(*pmd) || unlikely(pmd_bad(*pmd)))
                return NULL;