btrfs: handle btrfs_search_slot failure in replace_path
authorJosef Bacik <josef@toxicpanda.com>
Fri, 12 Mar 2021 20:25:23 +0000 (15:25 -0500)
committerDavid Sterba <dsterba@suse.com>
Mon, 19 Apr 2021 15:25:21 +0000 (17:25 +0200)
commit0e9873e2fe43ea098e70c30c996ebb90a22cce43
treebe47dd10e7279825c6a13910555b13c0874b3208
parent45b87c5d2557a327bb702d00040cfbf2271b56ed
btrfs: handle btrfs_search_slot failure in replace_path

The search can fail for various reasons, in case of errors there's no
cleanup to be done so we can pass the error to the caller, adjusting for
the case where the key is not found and search slot returns 1.

Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
[ update changelog ]
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/relocation.c