summaryrefslogtreecommitdiffstats
path: root/mm/gup.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2016-02-04 08:57:44 +0100
committerIngo Molnar <mingo@kernel.org>2016-02-04 08:57:44 +0100
commitb83ea91f08f648460b08e8980560abdf96060a19 (patch)
tree1a6db205770ed7103afe0aa1234dec0b1227f380 /mm/gup.c
parent8eb22c984eb9eeaed47130f5679acd367af69678 (diff)
parent580df49eed6639263348af3ff60941ff14aa72c0 (diff)
downloadlinux-b83ea91f08f648460b08e8980560abdf96060a19.tar.bz2
Merge branch 'perf/urgent' into perf/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
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)
* Anon pages in shared mappings are surprising: now
* just reject it.
*/
- if (!is_cow_mapping(vm_flags)) {
- WARN_ON_ONCE(vm_flags & VM_MAYWRITE);
+ if (!is_cow_mapping(vm_flags))
return -EFAULT;
- }
}
} else if (!(vm_flags & VM_READ)) {
if (!(gup_flags & FOLL_FORCE))