diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-16 22:30:16 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-16 22:30:16 +0400 |
commit | 69257cae20640a396f03aa0bf169b815ba66a58a (patch) | |
tree | 7aa7d5fde623e6be4a03ce11277adbb492e5e2a6 /fs | |
parent | 23059a0df5fad3d83b9a21fc2696a39148f49617 (diff) | |
parent | 978d910d31c5202e251298bf3f603300a54605dd (diff) | |
download | linux-69257cae20640a396f03aa0bf169b815ba66a58a.tar.xz |
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
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/transaction.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index 2e177d7f4bb9..4e83457ea253 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c @@ -543,13 +543,13 @@ static noinline int commit_fs_roots(struct btrfs_trans_handle *trans, btrfs_free_log(trans, root); btrfs_update_reloc_root(trans, root); - if (root->commit_root == root->node) - continue; - - free_extent_buffer(root->commit_root); - root->commit_root = btrfs_root_node(root); + if (root->commit_root != root->node) { + free_extent_buffer(root->commit_root); + root->commit_root = btrfs_root_node(root); + btrfs_set_root_node(&root->root_item, + root->node); + } - btrfs_set_root_node(&root->root_item, root->node); err = btrfs_update_root(trans, fs_info->tree_root, &root->root_key, &root->root_item); |