diff options
-rw-r--r-- | mm/memory.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/memory.c b/mm/memory.c index c50a195041ec..840ce9d98f8b 100644 --- a/mm/memory.c +++ b/mm/memory.c | |||
@@ -1288,7 +1288,7 @@ struct page *follow_page(struct vm_area_struct *vma, unsigned long address, | |||
1288 | pud = pud_offset(pgd, address); | 1288 | pud = pud_offset(pgd, address); |
1289 | if (pud_none(*pud)) | 1289 | if (pud_none(*pud)) |
1290 | goto no_page_table; | 1290 | goto no_page_table; |
1291 | if (pud_huge(*pud)) { | 1291 | if (pud_huge(*pud) && vma->vm_flags & VM_HUGETLB) { |
1292 | BUG_ON(flags & FOLL_GET); | 1292 | BUG_ON(flags & FOLL_GET); |
1293 | page = follow_huge_pud(mm, address, pud, flags & FOLL_WRITE); | 1293 | page = follow_huge_pud(mm, address, pud, flags & FOLL_WRITE); |
1294 | goto out; | 1294 | goto out; |