[v9,11/14] mm/gup: change index type to long as it counts pages
diff mbox series

Message ID 20210201153827.444374-12-pasha.tatashin@soleen.com
State In Next
Commit d0cc2b3d890a14b95ffb6b47f6c1eacfdfa908d1
Headers show
Series
  • prohibit pinning pages in ZONE_MOVABLE
Related show

Commit Message

Pavel Tatashin Feb. 1, 2021, 3:38 p.m. UTC
In __get_user_pages_locked() i counts number of pages which should be
long, as long is used in all other places to contain number of pages, and
32-bit becomes increasingly small for handling page count proportional
values.

Signed-off-by: Pavel Tatashin <pasha.tatashin@soleen.com>
Acked-by: Michal Hocko <mhocko@suse.com>
---
 mm/gup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/mm/gup.c b/mm/gup.c
index df29825305f8..f98af75dab0f 100644
--- a/mm/gup.c
+++ b/mm/gup.c
@@ -1479,7 +1479,7 @@  static long __get_user_pages_locked(struct mm_struct *mm, unsigned long start,
 {
 	struct vm_area_struct *vma;
 	unsigned long vm_flags;
-	int i;
+	long i;
 
 	/* calculate required read or write permissions.
 	 * If FOLL_FORCE is set, we only require the "MAY" flags.