aboutsummaryrefslogtreecommitdiffstats
path: root/mm/gup.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/gup.c')
-rw-r--r--mm/gup.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/mm/gup.c b/mm/gup.c
index b64a36175884..7bf19ffa2199 100644
--- a/mm/gup.c
+++ b/mm/gup.c
@@ -430,10 +430,8 @@ static int check_vma_flags(struct vm_area_struct *vma, unsigned long gup_flags)
430 * Anon pages in shared mappings are surprising: now 430 * Anon pages in shared mappings are surprising: now
431 * just reject it. 431 * just reject it.
432 */ 432 */
433 if (!is_cow_mapping(vm_flags)) { 433 if (!is_cow_mapping(vm_flags))
434 WARN_ON_ONCE(vm_flags & VM_MAYWRITE);
435 return -EFAULT; 434 return -EFAULT;
436 }
437 } 435 }
438 } else if (!(vm_flags & VM_READ)) { 436 } else if (!(vm_flags & VM_READ)) {
439 if (!(gup_flags & FOLL_FORCE)) 437 if (!(gup_flags & FOLL_FORCE))