Re: [PATCH v2 1/2] Btrfs: add missing error handling after doing leaf/node binary search

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 18, 2019 at 05:07:30PM +0000, fdmanana@xxxxxxxxxx wrote:
> From: Filipe Manana <fdmanana@xxxxxxxx>
> 
> 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.
> 
> Signed-off-by: Filipe Manana <fdmanana@xxxxxxxx>

Reviewed-by: David Sterba <dsterba@xxxxxxxx>

The binary search functions are called from functions that return errors
and those are handled.

Grepping for map_private_extent_buffer pointed to the set/get function
template DEFINE_BTRFS_SETGET_BITS, handling errors there seems to be
more tricky.



[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux