lkml.org 
[lkml]   [2020]   [Dec]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 07/10] mm/gup: change index type to long as it counts pages
On Thu 17-12-20 13:52:40, Pavel Tatashin wrote:
> In __get_user_pages_locked() i counts number of pages which should be
> long.

Do we know of any caller who would like to pin so many pages it wouldn't
fit into an int? I suspect this is more to sync types of nr_pages and
the iterator right. It would be better to be explicit about this in the
changelog.

> 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(-)
>
> diff --git a/mm/gup.c b/mm/gup.c
> index 591d8e2dfc70..1ebb7cc2fbe4 100644
> --- a/mm/gup.c
> +++ b/mm/gup.c
> @@ -1481,7 +1481,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.
> --
> 2.25.1

--
Michal Hocko
SUSE Labs

\
 
 \ /
  Last update: 2020-12-18 10:54    [W:1.362 / U:24.504 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site