btrfs: Fix transaction abort during failure in btrfs_rm_dev_item
authorNikolay Borisov <nborisov@suse.com>
Mon, 23 Oct 2017 06:58:46 +0000 (09:58 +0300)
committerDavid Sterba <dsterba@suse.com>
Wed, 15 Nov 2017 13:44:44 +0000 (14:44 +0100)
commit5e9f2ad5b2904a7e81df6d9a3dbef29478952eac
tree627c60136505f4104a5fc306de2d82f4ad323134
parentf82b735936ffd58b6711cf1f1054616517d8ffcd
btrfs: Fix transaction abort during failure in btrfs_rm_dev_item

btrfs_rm_dev_item calls several function under an active transaction,
however it fails to abort it if an error happens. Fix this by adding
explicit btrfs_abort_transaction/btrfs_end_transaction calls.

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/volumes.c