summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-01-30 11:43:54 -0500
committerDavid Woodhouse <dwmw2@hera.kernel.org>2008-01-30 11:43:54 -0500
commit45391b1a983e14ef9ee1f57186a2d009b02fa83b (patch)
tree9c9a2a221fda5aa1c446042eaf3107c35f48285e
parentaa69dec31c165783f5210e423c29a50ac97b25fb (diff)
Copy correct tree when inserting into slot 0
-rw-r--r--ctree.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ctree.c b/ctree.c
index fa3c04c4..4f7e6d0e 100644
--- a/ctree.c
+++ b/ctree.c
@@ -2297,13 +2297,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;
}