On Thu, Sep 28, 2017 at 11:45:27AM +0300, Nikolay Borisov wrote: > 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 <nbori...@suse.com> > --- > > v2: > * Explicitly handle every failure case w.r.t transaction abort rather than > rely on final btrfs_commit_transaction() to do the right thing. > > * Also consider the -ENOENT case from btrfs_search_slot as a failure.
The devid is checked in the caller, outside of the transaction, so it is fine to abort here, the devid is supposed to be there. Reviewed-by: David Sterba <dste...@suse.com> -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html