Commit d18c7bd9 authored by Josef Bacik's avatar Josef Bacik Committed by David Sterba

btrfs: handle btrfs_record_root_in_trans failure in relocate_tree_block

btrfs_record_root_in_trans will return errors in the future, so handle
the error properly in relocate_tree_block.
Reviewed-by: default avatarQu Wenruo <wqu@suse.com>
Signed-off-by: default avatarJosef Bacik <josef@toxicpanda.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 221581e4
...@@ -2548,7 +2548,9 @@ static int relocate_tree_block(struct btrfs_trans_handle *trans, ...@@ -2548,7 +2548,9 @@ static int relocate_tree_block(struct btrfs_trans_handle *trans,
ret = -EUCLEAN; ret = -EUCLEAN;
goto out; goto out;
} }
btrfs_record_root_in_trans(trans, root); ret = btrfs_record_root_in_trans(trans, root);
if (ret)
goto out;
root = root->reloc_root; root = root->reloc_root;
node->new_bytenr = root->node->start; node->new_bytenr = root->node->start;
btrfs_put_root(node->root); btrfs_put_root(node->root);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment