Re: [GIT PULL] MM updates for 6.5-rc1

From: David Howells
Date: Wed Jun 28 2023 - 15:11:47 EST


Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:

> So I think it needs to match the comment (and the try_grab_page()
> logic), and just basically
>
> if (flags & FOLL_GET)
> return try_get_folio(page, refs);
>
> if (is_zero_page(page))
> return page_folio(page);
>
> folio = try_get_folio(page, refs);
> if (!folio)
> return NULL;
>
> instead.

That looks right.

David