Re: [PATCH v2 3/4] mm/gup: make failure to pin an error if FOLL_NOWAIT not specified

From: David Hildenbrand
Date: Fri Oct 06 2023 - 08:57:54 EST


On 03.10.23 01:14, Lorenzo Stoakes wrote:
There really should be no circumstances under which a non-FOLL_NOWAIT GUP
operation fails to return any pages, so make this an error and warn on it.

To catch the trivial case, simply exit early if nr_pages == 0.

This brings __get_user_pages_locked() in line with the behaviour of its
nommu variant.

Reviewed-by: Arnd Bergmann <arnd@xxxxxxxx>
Signed-off-by: Lorenzo Stoakes <lstoakes@xxxxxxxxx>
---

Reviewed-by: David Hildenbrand <david@xxxxxxxxxx>

--
Cheers,

David / dhildenb