diff options
author | Chris Mason <chris.mason@oracle.com> | 2007-12-13 09:48:07 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 11:03:58 -0400 |
commit | 6caab489c5866788ae64a72986520b1f0e40c706 (patch) | |
tree | e7250f63bf66fbb81d7f9719e2691b4c441cd69f /fs/btrfs/extent-tree.c | |
parent | 7a7205367dfd9adf129f0ebc7d040a557fe0d1ba (diff) |
Fix btrfs_inc_ref to add backref hints
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r-- | fs/btrfs/extent-tree.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 7c953b2ecf15..057cdd49c09b 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c | |||
@@ -702,7 +702,7 @@ int btrfs_inc_root_ref(struct btrfs_trans_handle *trans, | |||
702 | } | 702 | } |
703 | return btrfs_inc_extent_ref(trans, root, root->node->start, | 703 | return btrfs_inc_extent_ref(trans, root, root->node->start, |
704 | root->node->len, owner_objectid, | 704 | root->node->len, owner_objectid, |
705 | generation, 0, 0); | 705 | generation, key_objectid, level); |
706 | } | 706 | } |
707 | 707 | ||
708 | int btrfs_inc_ref(struct btrfs_trans_handle *trans, struct btrfs_root *root, | 708 | int btrfs_inc_ref(struct btrfs_trans_handle *trans, struct btrfs_root *root, |
@@ -746,10 +746,12 @@ int btrfs_inc_ref(struct btrfs_trans_handle *trans, struct btrfs_root *root, | |||
746 | } | 746 | } |
747 | } else { | 747 | } else { |
748 | bytenr = btrfs_node_blockptr(buf, i); | 748 | bytenr = btrfs_node_blockptr(buf, i); |
749 | btrfs_node_key_to_cpu(buf, &key, i); | ||
749 | ret = btrfs_inc_extent_ref(trans, root, bytenr, | 750 | ret = btrfs_inc_extent_ref(trans, root, bytenr, |
750 | btrfs_level_size(root, level - 1), | 751 | btrfs_level_size(root, level - 1), |
751 | root->root_key.objectid, | 752 | root->root_key.objectid, |
752 | trans->transid, 0, 0); | 753 | trans->transid, key.objectid, |
754 | level - 1); | ||
753 | if (ret) { | 755 | if (ret) { |
754 | faili = i; | 756 | faili = i; |
755 | goto fail; | 757 | goto fail; |