btrfs: Refactor transaction handling in received subvolume ioctl
authorNikolay Borisov <nborisov@suse.com>
Thu, 28 Sep 2017 08:45:26 +0000 (11:45 +0300)
committerDavid Sterba <dsterba@suse.com>
Mon, 30 Oct 2017 11:27:58 +0000 (12:27 +0100)
commitefd38150af45375b46576d0110a323d7fab7e142
tree0bc1dad0beb91d36fa5d1976c27b5ffaf0bf3108
parent9417ebc8a676487c6ec8825f92fb28f7dbeb5f4b
btrfs: Refactor transaction handling in received subvolume ioctl

If btrfs_transaction_commit fails it will proceed to call
cleanup_transaction, which in turn already does btrfs_abort_transaction.
So let's remove the unnecessary code duplication. Also let's be explicit
about handling failure of btrfs_uuid_tree_add by calling
btrfs_end_transaction.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ioctl.c