mm: retire GUP WARN_ON_ONCE that outlived its usefulness

Trinity is now hitting the WARN_ON_ONCE we added in v3.15 commit
cda540ace6 ("mm: get_user_pages(write,force) refuse to COW in shared
areas").  The warning has served its purpose, nobody was harmed by that
change, so just remove the warning to generate less noise from Trinity.

Which reminds me of the comment I wrongly left behind with that commit
(but was spotted at the time by Kirill), which has since moved into a
separate function, and become even more obscure: delete it.

Reported-by: Dave Jones <[email protected]>
Suggested-by: Kirill A. Shutemov <[email protected]>
Signed-off-by: Hugh Dickins <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
Hugh Dickins 2016-01-30 18:03:16 -08:00 • committed by Linus Torvalds
commit 4643536474
2 changed files with 1 additions and 8 deletions

View file

@ -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))