lkml.org 
[lkml]   [2022]   [Aug]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 1/2] mm/gup.c: Don't pass gup_flags to check_and_migrate_movable_pages()
On Fri, Aug 05, 2022 at 04:29:52PM +1000, Alistair Popple wrote:
> @@ -2053,7 +2046,9 @@ static long __gup_longterm_locked(struct mm_struct *mm,
> NULL, gup_flags);
> if (rc <= 0)
> break;
> - rc = check_and_migrate_movable_pages(rc, pages, gup_flags);
> +
> + WARN_ON_ONCE(!(gup_flags & FOLL_PIN));
> + rc = check_and_migrate_movable_pages(rc, pages);

This should be moved up:

if (!(gup_flags & FOLL_LONGTERM))
return __get_user_pages_locked(mm, start, nr_pages, pages, vmas,
NULL, gup_flags);
if (WARN_ON(!(gup_flags & FOLL_PIN)))
return -EINVAL;
flags = memalloc_pin_save();

Jason

\
 
 \ /
  Last update: 2022-08-05 14:07    [W:0.069 / U:0.640 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site