]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: fix lost error return value when reading a data page
authorFilipe Manana <fdmanana@suse.com>
Thu, 3 Feb 2022 15:36:43 +0000 (15:36 +0000)
committerDavid Sterba <dsterba@suse.com>
Mon, 14 Mar 2022 12:13:50 +0000 (13:13 +0100)
commit18cfcf52be74d64810c6ed68695050a03fafc511
treecffabc7196ceb02f3573c08abf0f581e8d6ed80d
parent050a1600a27bfe89b7702e0630a5e02b31cd23a5
btrfs: fix lost error return value when reading a data page

At btrfs_do_readpage(), if we get an error when trying to lookup for an
extent map, we end up marking the page with the error bit, clearing
the uptodate bit on it, and doing everything else that should be done.
However we return success (0) to the caller, when we should return the
error encoded in the extent map pointer. So fix that by returning the
error encoded in the pointer.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent_io.c
fs/btrfs/inode.c