lkml.org 
[lkml]   [2022]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 2/2] mm/gup.c: Refactor check_and_migrate_movable_pages()
On Wed, Aug 17, 2022 at 01:35:12PM -0700, John Hubbard wrote:
> How's this look to you:
>
> collected = collect_longterm_unpinnable_pages(&movable_page_list,
> nr_pages, pages);
> if (collected == 0)
> return 0;
>
> ret = migrate_longterm_unpinnable_pages(&movable_page_list, nr_pages,
> pages);
>
> /* If we got here, we have some unpinnable pages... */
>
> if (ret == 0) {
> /*
> * ...and we successfully migrated those pages. Which means that
> * the caller should retry the operation now.
> */
> ret = -EAGAIN;

return -EAGAIN

> }
>
> return ret;

But why return 0 from the helper function in the first place?

Jason

\
 
 \ /
  Last update: 2022-08-18 00:51    [W:0.103 / U:2.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site