|
@@ -1677,15 +1677,15 @@ static inline int stack_guard_page(struct vm_area_struct *vma, unsigned long add
|
|
|
* instead of __get_user_pages. __get_user_pages should be used only if
|
|
|
* you need some special @gup_flags.
|
|
|
*/
|
|
|
-int __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
|
|
|
- unsigned long start, int nr_pages, unsigned int gup_flags,
|
|
|
- struct page **pages, struct vm_area_struct **vmas,
|
|
|
- int *nonblocking)
|
|
|
+long __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
|
|
|
+ unsigned long start, unsigned long nr_pages,
|
|
|
+ unsigned int gup_flags, struct page **pages,
|
|
|
+ struct vm_area_struct **vmas, int *nonblocking)
|
|
|
{
|
|
|
- int i;
|
|
|
+ long i;
|
|
|
unsigned long vm_flags;
|
|
|
|
|
|
- if (nr_pages <= 0)
|
|
|
+ if (!nr_pages)
|
|
|
return 0;
|
|
|
|
|
|
VM_BUG_ON(!!pages != !!(gup_flags & FOLL_GET));
|
|
@@ -1981,9 +1981,9 @@ int fixup_user_fault(struct task_struct *tsk, struct mm_struct *mm,
|
|
|
*
|
|
|
* See also get_user_pages_fast, for performance critical applications.
|
|
|
*/
|
|
|
-int get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
|
|
|
- unsigned long start, int nr_pages, int write, int force,
|
|
|
- struct page **pages, struct vm_area_struct **vmas)
|
|
|
+long get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
|
|
|
+ unsigned long start, unsigned long nr_pages, int write,
|
|
|
+ int force, struct page **pages, struct vm_area_struct **vmas)
|
|
|
{
|
|
|
int flags = FOLL_TOUCH;
|
|
|
|