|
@@ -907,17 +907,10 @@ EXPORT_SYMBOL(__get_user_pages_unlocked);
|
|
|
* "force" parameter).
|
|
|
*/
|
|
|
long get_user_pages_unlocked(unsigned long start, unsigned long nr_pages,
|
|
|
- int write, int force, struct page **pages)
|
|
|
+ struct page **pages, unsigned int gup_flags)
|
|
|
{
|
|
|
- unsigned int flags = FOLL_TOUCH;
|
|
|
-
|
|
|
- if (write)
|
|
|
- flags |= FOLL_WRITE;
|
|
|
- if (force)
|
|
|
- flags |= FOLL_FORCE;
|
|
|
-
|
|
|
return __get_user_pages_unlocked(current, current->mm, start, nr_pages,
|
|
|
- pages, flags);
|
|
|
+ pages, gup_flags | FOLL_TOUCH);
|
|
|
}
|
|
|
EXPORT_SYMBOL(get_user_pages_unlocked);
|
|
|
|
|
@@ -1535,7 +1528,8 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write,
|
|
|
start += nr << PAGE_SHIFT;
|
|
|
pages += nr;
|
|
|
|
|
|
- ret = get_user_pages_unlocked(start, nr_pages - nr, write, 0, pages);
|
|
|
+ ret = get_user_pages_unlocked(start, nr_pages - nr, pages,
|
|
|
+ write ? FOLL_WRITE : 0);
|
|
|
|
|
|
/* Have to be a bit careful with return values */
|
|
|
if (nr > 0) {
|