Commit 00aa8e87 authored by Josef Bacik's avatar Josef Bacik Committed by David Sterba

btrfs: handle btrfs_record_root_in_trans failure in btrfs_rename_exchange

btrfs_record_root_in_trans will return errors in the future, so handle
the error properly in btrfs_rename_exchange.
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 404bccbc
......@@ -9108,8 +9108,11 @@ static int btrfs_rename_exchange(struct inode *old_dir,
goto out_notrans;
}
if (dest != root)
btrfs_record_root_in_trans(trans, dest);
if (dest != root) {
ret = btrfs_record_root_in_trans(trans, dest);
if (ret)
goto out_fail;
}
/*
* We need to find a free sequence number both in the source and
......
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