]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: add missing error handling after doing leaf/node binary search
authorFilipe Manana <fdmanana@suse.com>
Mon, 18 Feb 2019 16:57:26 +0000 (16:57 +0000)
committerDavid Sterba <dsterba@suse.com>
Mon, 25 Feb 2019 13:19:23 +0000 (14:19 +0100)
commit9ec3127f9982967cb86111986f44dd9a2ca39bb2
treec3a896b5ab18e6d1054e3a30b0408d91d1d3bfa2
parent2442d0d77306e94b611001e5445bce0f31ca5f62
Btrfs: add missing error handling after doing leaf/node binary search

The function map_private_extent_buffer() can return an -EINVAL error, and
it is called by generic_bin_search() which will return back the error. The
btrfs_bin_search() function in turn calls generic_bin_search() and the
key_search() function calls btrfs_bin_search(), so both can return the
-EINVAL error coming from the map_private_extent_buffer() function. Some
callers of these functions were ignoring that these functions can return
an error, so fix them to deal with error return values.

Reviewed-by: Nikolay Borisov <nborisov@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/ctree.c
fs/btrfs/relocation.c
fs/btrfs/tree-log.c