mm: replace get_user_pages() write/force parameters with gup_flags
[linux-2.6-block.git] / mm / gup.c
index 3cfb55ef0cf4e3bce1cd8c6f56c9801389035617..bbc2e76cdd776a6a3d2052bc3182704ed6565d7d 100644 (file)
--- a/mm/gup.c
+++ b/mm/gup.c
@@ -987,18 +987,12 @@ EXPORT_SYMBOL(get_user_pages_remote);
  * obviously don't pass FOLL_REMOTE in here.
  */
 long get_user_pages(unsigned long start, unsigned long nr_pages,
-               int write, int force, struct page **pages,
+               unsigned int gup_flags, struct page **pages,
                struct vm_area_struct **vmas)
 {
-       unsigned int flags = FOLL_TOUCH;
-
-       if (write)
-               flags |= FOLL_WRITE;
-       if (force)
-               flags |= FOLL_FORCE;
-
        return __get_user_pages_locked(current, current->mm, start, nr_pages,
-                                      pages, vmas, NULL, false, flags);
+                                      pages, vmas, NULL, false,
+                                      gup_flags | FOLL_TOUCH);
 }
 EXPORT_SYMBOL(get_user_pages);