summaryrefslogtreecommitdiffstats
path: root/arch/sparc/mm
diff options
context:
space:
mode:
authorLorenzo Stoakes <lstoakes@gmail.com>2016-10-13 02:20:13 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2016-10-18 23:13:37 +0200
commitc164154f66f0c9b02673f07aa4f044f1d9c70274 (patch)
treefdfdc521c7cadcbbd8b4bb6bd85e8b17c13fcb13 /arch/sparc/mm
parentmm: remove write/force parameters from __get_user_pages_unlocked() (diff)
downloadlinux-c164154f66f0c9b02673f07aa4f044f1d9c70274.tar.xz
linux-c164154f66f0c9b02673f07aa4f044f1d9c70274.zip
mm: replace get_user_pages_unlocked() write/force parameters with gup_flags
This removes the 'write' and 'force' use from get_user_pages_unlocked() and replaces them with 'gup_flags' to make the use of FOLL_FORCE explicit in callers as use of this flag can result in surprising behaviour (and hence bugs) within the mm subsystem. Signed-off-by: Lorenzo Stoakes <lstoakes@gmail.com> Reviewed-by: Jan Kara <jack@suse.cz> Acked-by: Michal Hocko <mhocko@suse.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/sparc/mm')
-rw-r--r--arch/sparc/mm/gup.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/sparc/mm/gup.c b/arch/sparc/mm/gup.c
index 4e06750a5d29..cd0e32bbcb1d 100644
--- a/arch/sparc/mm/gup.c
+++ b/arch/sparc/mm/gup.c
@@ -238,7 +238,8 @@ slow:
pages += nr;
ret = get_user_pages_unlocked(start,
- (end - start) >> PAGE_SHIFT, write, 0, pages);
+ (end - start) >> PAGE_SHIFT, pages,
+ write ? FOLL_WRITE : 0);
/* Have to be a bit careful with return values */
if (nr > 0) {