[Cluster-devel] return an ERR_PTR from __filemap_get_folio v3

Andreas Gruenbacher agruenba at redhat.com
Tue Mar 7 07:23:50 PST 2023


On Tue, Mar 7, 2023 at 4:07 PM Christoph Hellwig <hch at lst.de> wrote:
> __filemap_get_folio and its wrappers can return NULL for three different
> conditions, which in some cases requires the caller to reverse engineer
> the decision making.  This is fixed by returning an ERR_PTR instead of
> NULL and thus transporting the reason for the failure.  But to make
> that work we first need to ensure that no xa_value special case is
> returned and thus return the FGP_ENTRY flag.  It turns out that flag
> is barely used and can usually be deal with in a better way.

Thanks for working on this cleanup; looking good at a first glance.

Andreas




More information about the linux-afs mailing list