Merge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable

* git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable:
  Btrfs: always update root items for fs trees at commit time
This commit is contained in:
Linus Torvalds 2009-06-16 11:30:16 -07:00
commit 69257cae20

View File

@ -543,13 +543,13 @@ static noinline int commit_fs_roots(struct btrfs_trans_handle *trans,
btrfs_free_log(trans, root); btrfs_free_log(trans, root);
btrfs_update_reloc_root(trans, root); btrfs_update_reloc_root(trans, root);
if (root->commit_root == root->node) if (root->commit_root != root->node) {
continue; free_extent_buffer(root->commit_root);
root->commit_root = btrfs_root_node(root);
btrfs_set_root_node(&root->root_item,
root->node);
}
free_extent_buffer(root->commit_root);
root->commit_root = btrfs_root_node(root);
btrfs_set_root_node(&root->root_item, root->node);
err = btrfs_update_root(trans, fs_info->tree_root, err = btrfs_update_root(trans, fs_info->tree_root,
&root->root_key, &root->root_key,
&root->root_item); &root->root_item);