Re: [PATCH v4] btrfs: Fix transaction abort during failure in btrfs_rm_dev_item

2017-10-30 Thread David Sterba
On Mon, Oct 23, 2017 at 10:29:27AM -0600, Edmund Nadolski wrote: > > --- a/fs/btrfs/volumes.c > > +++ b/fs/btrfs/volumes.c > > @@ -1765,20 +1765,24 @@ static int btrfs_rm_dev_item(struct btrfs_fs_info > > *fs_info, > > key.offset = device->devid; > > > > ret = btrfs_search_slot(trans,

Re: [PATCH v4] btrfs: Fix transaction abort during failure in btrfs_rm_dev_item

2017-10-23 Thread Edmund Nadolski
On 10/23/2017 12:58 AM, Nikolay Borisov wrote: > btrfs_rm_dev_item calls several function under an activa transaction, however ^^ active > it fails to abort it if an error happens. Fix this by adding explicit >

[PATCH v4] btrfs: Fix transaction abort during failure in btrfs_rm_dev_item

2017-10-23 Thread Nikolay Borisov
btrfs_rm_dev_item calls several function under an activa 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 --- V4: * Reorder the code a bit to prevent