diff options
author | Lorenzo Stoakes <lstoakes@gmail.com> | 2016-10-13 03:20:13 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-12-17 23:55:16 +0300 |
commit | 2b29980eb75bc7dcb23ed0436fe805ac6e684542 (patch) | |
tree | d88fce1140a7d2fd22fa268abf2c3d80bfd26b9b /mm/nommu.c | |
parent | ff099ed77421a5dc8206bb61e5a598b28ab39ebb (diff) | |
download | linux-2b29980eb75bc7dcb23ed0436fe805ac6e684542.tar.xz |
mm: replace get_user_pages_unlocked() write/force parameters with gup_flags
commit c164154f66f0c9b02673f07aa4f044f1d9c70274 upstream.
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>
[bwh: Backported to 4.4:
- Also update calls from process_vm_rw_single_vec() and async_pf_execute()
- Adjust context]
Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'mm/nommu.c')
-rw-r--r-- | mm/nommu.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/mm/nommu.c b/mm/nommu.c index f5322195dbcd..e249e06579fb 100644 --- a/mm/nommu.c +++ b/mm/nommu.c @@ -224,17 +224,10 @@ EXPORT_SYMBOL(__get_user_pages_unlocked); long get_user_pages_unlocked(struct task_struct *tsk, struct mm_struct *mm, unsigned long start, unsigned long nr_pages, - int write, int force, struct page **pages) + struct page **pages, unsigned int gup_flags) { - unsigned int flags = 0; - - if (write) - flags |= FOLL_WRITE; - if (force) - flags |= FOLL_FORCE; - return __get_user_pages_unlocked(tsk, mm, start, nr_pages, - pages, flags); + pages, gup_flags); } EXPORT_SYMBOL(get_user_pages_unlocked); |