diff options
-rw-r--r-- | arch/powerpc/mm/gup.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/powerpc/mm/gup.c b/arch/powerpc/mm/gup.c index 4b921affa495..223a255545fc 100644 --- a/arch/powerpc/mm/gup.c +++ b/arch/powerpc/mm/gup.c | |||
@@ -66,9 +66,15 @@ static int gup_pmd_range(pud_t pud, unsigned long addr, unsigned long end, | |||
66 | pmd_t pmd = *pmdp; | 66 | pmd_t pmd = *pmdp; |
67 | 67 | ||
68 | next = pmd_addr_end(addr, end); | 68 | next = pmd_addr_end(addr, end); |
69 | if (pmd_none(pmd)) | 69 | /* |
70 | * If we find a splitting transparent hugepage we | ||
71 | * return zero. That will result in taking the slow | ||
72 | * path which will call wait_split_huge_page() | ||
73 | * if the pmd is still in splitting state | ||
74 | */ | ||
75 | if (pmd_none(pmd) || pmd_trans_splitting(pmd)) | ||
70 | return 0; | 76 | return 0; |
71 | if (pmd_huge(pmd)) { | 77 | if (pmd_huge(pmd) || pmd_large(pmd)) { |
72 | if (!gup_hugepte((pte_t *)pmdp, PMD_SIZE, addr, next, | 78 | if (!gup_hugepte((pte_t *)pmdp, PMD_SIZE, addr, next, |
73 | write, pages, nr)) | 79 | write, pages, nr)) |
74 | return 0; | 80 | return 0; |