btrfs-progs: disk-io: Support commit transaction on chunk tree

As chunk tree is only stored in super block, chunk tree commit doesn't
need to go through tree root update.
Or a BUG_ON will be triggered.

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Qu Wenruo 2015-07-07 16:15:22 +08:00 committed by David Sterba
parent fd31a4d6ba
commit de70c9aed8

View File

@ -571,6 +571,8 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans,
goto commit_tree;
if (root == root->fs_info->tree_root)
goto commit_tree;
if (root == root->fs_info->chunk_root)
goto commit_tree;
free_extent_buffer(root->commit_root);
root->commit_root = NULL;