aboutsummaryrefslogtreecommitdiff
path: root/fs/btrfs/ctree.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-01-30 11:43:54 -0500
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:04:00 -0400
commit5a01a2e3a9d4dc9cb4871dde4d832a3b8de9f748 (patch)
treee7f65c9f72bc998e2c3ee30df4f191864684938b /fs/btrfs/ctree.c
parentb3236e68bf86b3ae87f58984a1822369225211cb (diff)
Btrfs: Copy correct tree when inserting into slot 0
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/ctree.c')
-rw-r--r--fs/btrfs/ctree.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
index fb2e2bd506c..cf32651876b 100644
--- a/fs/btrfs/ctree.c
+++ b/fs/btrfs/ctree.c
@@ -2443,13 +2443,16 @@ int btrfs_insert_empty_items(struct btrfs_trans_handle *trans,
btrfs_mark_buffer_dirty(leaf);
ret = 0;
- if (slot == 0)
+ if (slot == 0) {
+ btrfs_cpu_key_to_disk(&disk_key, cpu_key);
ret = fixup_low_keys(trans, root, path, &disk_key, 1);
+ }
if (btrfs_leaf_free_space(root, leaf) < 0) {
btrfs_print_leaf(root, leaf);
BUG();
}
+
out:
return ret;
}