Skip to contentSkip to conversation

Btrfs: end transaction if we abort when creating qgroup root

PATCH Superseded Josef Bacik 2 participants 3 messages Sep 23, 2015 – Sep 27, 2015 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Btrfs: end transaction if we abort when creating qgroup root

We still need to call btrfs_end_transaction if we call btrfs_abort_transaction, otherwise we hang and make me super grumpy. Thanks,

---
 fs/btrfs/volumes.c | 1 +
 1 file changed, 1 insertion(+)
fs/btrfs/volumes.c +1 -0
index fbe7c10..18b5e13 100644
@@ -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, root);
 		return ret;
 	}
 
Signature · 1 line
1.8.3.1
#1 lore raw

PATCH v2 1/1 Btrfs: end transaction if we abort when creating qgroup root

We still need to call btrfs_end_transaction if we call btrfs_abort_transaction, otherwise we hang and make me super grumpy. Thanks,

---
V1->V2: should have compiled before I hit send.

 fs/btrfs/volumes.c | 1 +
 1 file changed, 1 insertion(+)
fs/btrfs/volumes.c +1 -0
index fbe7c10..ff64689 100644
@@ -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;
 	}
 
Signature · 1 line
1.8.3.1
#2 lore raw
Quoted 2 lines · Josef Bacik

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.

fs/btrfs/volumes.c int btrfs_create_uuid_tree(struct btrfs_fs_info *fs_info)

Quoted 12 lines

---
V1->V2: should have compiled before I hit send.

 fs/btrfs/volumes.c | 1 +
 1 file changed, 1 insertion(+)
fs/btrfs/volumes.c +0 -0
index fbe7c10..ff64689 100644
@@ -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.

Quoted 9 lines
fs/btrfs/volumes.c +1 -0
 	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;
 	}
 
Signature · 1 line
1.8.3.1
Signature · 1 line
Omar