diff mbox

[V2] Btrfs: end transaction if we abort when creating qgroup root

Message ID 1443034837-1723-1-git-send-email-jbacik@fb.com (mailing list archive)
State New, archived
Headers show

Commit Message

Josef Bacik Sept. 23, 2015, 7 p.m. UTC
We still need to call btrfs_end_transaction if we call btrfs_abort_transaction,
otherwise we hang and make me super grumpy.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fb.com>
---
V1->V2: should have compiled before I hit send.

 fs/btrfs/volumes.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Omar Sandoval Sept. 27, 2015, 12:54 a.m. UTC | #1
On Wed, Sep 23, 2015 at 03:00:37PM -0400, Josef Bacik wrote:
> We still need to call btrfs_end_transaction if we call btrfs_abort_transaction,
> otherwise we hang and make me super grumpy.  Thanks,

I made the same mistake in the free space tree, I'll fix that before I
forget.

> Signed-off-by: Josef Bacik <jbacik@fb.com>
> ---
> V1->V2: should have compiled before I hit send.
> 
>  fs/btrfs/volumes.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
> index fbe7c10..ff64689 100644
> --- a/fs/btrfs/volumes.c
> +++ b/fs/btrfs/volumes.c
> @@ -4028,6 +4028,7 @@ int btrfs_create_uuid_tree(struct btrfs_fs_info *fs_info)

The subject says the qgroup root but this is the uuid tree.

>  	if (IS_ERR(uuid_root)) {
>  		ret = PTR_ERR(uuid_root);
>  		btrfs_abort_transaction(trans, tree_root, ret);
> +		btrfs_end_transaction(trans, tree_root);
>  		return ret;
>  	}
>  
> -- 
> 1.8.3.1
diff mbox

Patch

diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index fbe7c10..ff64689 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -4028,6 +4028,7 @@  int btrfs_create_uuid_tree(struct btrfs_fs_info *fs_info)
 	if (IS_ERR(uuid_root)) {
 		ret = PTR_ERR(uuid_root);
 		btrfs_abort_transaction(trans, tree_root, ret);
+		btrfs_end_transaction(trans, tree_root);
 		return ret;
 	}