The patch titled Subject: mm-hugetlbc-make-huge_pte_offset-consistent-and-document-behaviour-v2 has been removed from the -mm tree. Its filename was mm-hugetlbc-make-huge_pte_offset-consistent-and-document-behaviour-v2.patch This patch was dropped because it was folded into mm-hugetlb-make-huge_pte_offset-consistent-and-document-behaviour.patch ------------------------------------------------------ From: Punit Agrawal <punit.agrawal@xxxxxxx> Subject: mm-hugetlbc-make-huge_pte_offset-consistent-and-document-behaviour-v2 Signed-off-by: Punit Agrawal <punit.agrawal@xxxxxxx> Cc: Catalin Marinas <catalin.marinas@xxxxxxx> Cc: Naoya Horiguchi <n-horiguchi@xxxxxxxxxxxxx> Cc: Steve Capper <steve.capper@xxxxxxx> Cc: Will Deacon <will.deacon@xxxxxxx> Cc: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx> Cc: Michal Hocko <mhocko@xxxxxxxx> Cc: Mike Kravetz <mike.kravetz@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/hugetlb.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff -puN mm/hugetlb.c~mm-hugetlbc-make-huge_pte_offset-consistent-and-document-behaviour-v2 mm/hugetlb.c --- a/mm/hugetlb.c~mm-hugetlbc-make-huge_pte_offset-consistent-and-document-behaviour-v2 +++ a/mm/hugetlb.c @@ -4604,8 +4604,10 @@ pte_t *huge_pte_alloc(struct mm_struct * * huge_pte_offset() - Walk the page table to resolve the hugepage * entry at address @addr * - * Return: Pointer to page table or swap entry (PUD or PMD) for address @addr - * or NULL if the entry is p*d_none(). + * Return: Pointer to page table or swap entry (PUD or PMD) for + * address @addr, or NULL if a p*d_none() entry is encountered and the + * size @sz doesn't match the hugepage size at this level of the page + * table. */ pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr, unsigned long sz) @@ -4623,18 +4625,18 @@ pte_t *huge_pte_offset(struct mm_struct return NULL; pud = pud_offset(p4d, addr); - if (pud_none(*pud)) + if (sz != PUD_SIZE && pud_none(*pud)) return NULL; /* hugepage or swap? */ if (pud_huge(*pud) || !pud_present(*pud)) return (pte_t *)pud; pmd = pmd_offset(pud, addr); - if (pmd_none(*pmd)) + if (sz != PMD_SIZE && pmd_none(*pmd)) return NULL; /* hugepage or swap? */ if (pmd_huge(*pmd) || !pmd_present(*pmd)) - return (pte_t *) pmd; + return (pte_t *)pmd; return NULL; } _ Patches currently in -mm which might be from punit.agrawal@xxxxxxx are mm-hugetlb-make-huge_pte_offset-consistent-and-document-behaviour.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html