btrfs: handle btrfs_cow_block errors in replace_path
authorJosef Bacik <josef@toxicpanda.com>
Fri, 12 Mar 2021 20:25:22 +0000 (15:25 -0500)
committerDavid Sterba <dsterba@suse.com>
Mon, 19 Apr 2021 15:25:21 +0000 (17:25 +0200)
commit45b87c5d2557a327bb702d00040cfbf2271b56ed
treec90e15d53d67b9f0969763c6bac856ee0626e783
parent7a9213a93546e7eaef90e6e153af6b8fc7553f10
btrfs: handle btrfs_cow_block errors in replace_path

If we error out COWing the root node when doing a replace_path then we
simply unlock and free the buffer and return the error.

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