btrfs: handle errors in reference count manipulation in replace_path
authorJosef Bacik <josef@toxicpanda.com>
Fri, 12 Mar 2021 20:25:24 +0000 (15:25 -0500)
committerDavid Sterba <dsterba@suse.com>
Mon, 19 Apr 2021 15:25:21 +0000 (17:25 +0200)
commit253e258c34262c50ce2622b38d2769911a9cddfd
treee0c3fe610bb6eb925aa94311b9d010fbc261548f
parent0e9873e2fe43ea098e70c30c996ebb90a22cce43
btrfs: handle errors in reference count manipulation in replace_path

If any of the reference count manipulation stuff fails in replace_path
we need to abort the transaction, as we've modified the blocks already.
We can simply break at this point and everything will be cleaned up.

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