]> www.infradead.org Git - users/jedix/linux-maple.git/commit
btrfs: return real error from __filemap_get_folio() calls
authorFilipe Manana <fdmanana@suse.com>
Sat, 10 May 2025 12:59:54 +0000 (13:59 +0100)
committerDavid Sterba <dsterba@suse.com>
Thu, 15 May 2025 12:30:57 +0000 (14:30 +0200)
commit443e4d0e1c622885cb3d048619b4cc2c27a812bd
tree753b6fa2bd505f1b6c6d50f096e72d20e9333242
parentca84913d490dad56b5ca7580be064b039039bd34
btrfs: return real error from __filemap_get_folio() calls

We have a few places that always assume a -ENOMEM error happened in case a
call to __filemap_get_folio() returns an error, which is just too much of
an assumption and even if it would be the case at some point in time, it's
not future proof and there's nothing in the documentation that guarantees
that only ERR_PTR(-ENOMEM) can be returned with the flags we are passing
to it.

So use the exact error returned by __filemap_get_folio() instead.

Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/free-space-cache.c
fs/btrfs/inode.c
fs/btrfs/reflink.c