diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-16 14:30:16 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-16 14:30:16 -0400 |
commit | 69257cae20640a396f03aa0bf169b815ba66a58a (patch) | |
tree | 7aa7d5fde623e6be4a03ce11277adbb492e5e2a6 /fs/btrfs | |
parent | 23059a0df5fad3d83b9a21fc2696a39148f49617 (diff) | |
parent | 978d910d31c5202e251298bf3f603300a54605dd (diff) |
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/btrfs')
-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 2e177d7f4bb..4e83457ea25 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, | |||
543 | btrfs_free_log(trans, root); | 543 | btrfs_free_log(trans, root); |
544 | btrfs_update_reloc_root(trans, root); | 544 | btrfs_update_reloc_root(trans, root); |
545 | 545 | ||
546 | if (root->commit_root == root->node) | 546 | if (root->commit_root != root->node) { |
547 | continue; | 547 | free_extent_buffer(root->commit_root); |
548 | 548 | root->commit_root = btrfs_root_node(root); | |
549 | free_extent_buffer(root->commit_root); | 549 | btrfs_set_root_node(&root->root_item, |
550 | root->commit_root = btrfs_root_node(root); | 550 | root->node); |
551 | } | ||
551 | 552 | ||
552 | btrfs_set_root_node(&root->root_item, root->node); | ||
553 | err = btrfs_update_root(trans, fs_info->tree_root, | 553 | err = btrfs_update_root(trans, fs_info->tree_root, |
554 | &root->root_key, | 554 | &root->root_key, |
555 | &root->root_item); | 555 | &root->root_item); |