diff options
Diffstat (limited to 'mm/memory.c')
-rw-r--r-- | mm/memory.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/mm/memory.c b/mm/memory.c index 532a55bce6a4..6359a4f80c4a 100644 --- a/mm/memory.c +++ b/mm/memory.c | |||
@@ -1260,17 +1260,19 @@ int __get_user_pages(struct task_struct *tsk, struct mm_struct *mm, | |||
1260 | !(vm_flags & vma->vm_flags)) | 1260 | !(vm_flags & vma->vm_flags)) |
1261 | return i ? : -EFAULT; | 1261 | return i ? : -EFAULT; |
1262 | 1262 | ||
1263 | if (is_vm_hugetlb_page(vma)) { | ||
1264 | i = follow_hugetlb_page(mm, vma, pages, vmas, | ||
1265 | &start, &nr_pages, i, write); | ||
1266 | continue; | ||
1267 | } | ||
1268 | |||
1269 | foll_flags = FOLL_TOUCH; | 1263 | foll_flags = FOLL_TOUCH; |
1270 | if (pages) | 1264 | if (pages) |
1271 | foll_flags |= FOLL_GET; | 1265 | foll_flags |= FOLL_GET; |
1272 | if (flags & GUP_FLAGS_DUMP) | 1266 | if (flags & GUP_FLAGS_DUMP) |
1273 | foll_flags |= FOLL_DUMP; | 1267 | foll_flags |= FOLL_DUMP; |
1268 | if (write) | ||
1269 | foll_flags |= FOLL_WRITE; | ||
1270 | |||
1271 | if (is_vm_hugetlb_page(vma)) { | ||
1272 | i = follow_hugetlb_page(mm, vma, pages, vmas, | ||
1273 | &start, &nr_pages, i, foll_flags); | ||
1274 | continue; | ||
1275 | } | ||
1274 | 1276 | ||
1275 | do { | 1277 | do { |
1276 | struct page *page; | 1278 | struct page *page; |