diff options
author | Lorenzo Stoakes <lstoakes@gmail.com> | 2016-10-13 02:20:13 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-10-18 23:13:37 +0200 |
commit | c164154f66f0c9b02673f07aa4f044f1d9c70274 (patch) | |
tree | fdfdc521c7cadcbbd8b4bb6bd85e8b17c13fcb13 /drivers/scsi/st.c | |
parent | mm: remove write/force parameters from __get_user_pages_unlocked() (diff) | |
download | linux-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 'drivers/scsi/st.c')
-rw-r--r-- | drivers/scsi/st.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c index 7af5226aa55b..618422ea3a41 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c @@ -4922,9 +4922,8 @@ static int sgl_map_user_pages(struct st_buffer *STbp, res = get_user_pages_unlocked( uaddr, nr_pages, - rw == READ, - 0, /* don't force */ - pages); + pages, + rw == READ ? FOLL_WRITE : 0); /* don't force */ /* Errors and no page mapped should return here */ if (res < nr_pages) |