mm: use long type for page counts in mm_populate() and get_user_pages()
[deliverable/linux.git] / mm / hugetlb.c
index e14a8c79a1eb74cfe75352963a308f8e58c661a2..cdb64e4d238acb2f4a9ae8629adffc59e52c0a1f 100644 (file)
@@ -2920,14 +2920,14 @@ follow_huge_pud(struct mm_struct *mm, unsigned long address,
        return NULL;
 }
 
-int follow_hugetlb_page(struct mm_struct *mm, struct vm_area_struct *vma,
-                       struct page **pages, struct vm_area_struct **vmas,
-                       unsigned long *position, int *length, int i,
-                       unsigned int flags)
+long follow_hugetlb_page(struct mm_struct *mm, struct vm_area_struct *vma,
+                        struct page **pages, struct vm_area_struct **vmas,
+                        unsigned long *position, unsigned long *nr_pages,
+                        long i, unsigned int flags)
 {
        unsigned long pfn_offset;
        unsigned long vaddr = *position;
-       int remainder = *length;
+       unsigned long remainder = *nr_pages;
        struct hstate *h = hstate_vma(vma);
 
        spin_lock(&mm->page_table_lock);
@@ -2997,7 +2997,7 @@ same_page:
                }
        }
        spin_unlock(&mm->page_table_lock);
-       *length = remainder;
+       *nr_pages = remainder;
        *position = vaddr;
 
        return i ? i : -EFAULT;
This page took 0.026596 seconds and 5 git commands to generate.