summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-01-30 16:43:54 (GMT)
committerChris Mason <chris.mason@oracle.com>2008-09-25 15:04:00 (GMT)
commit5a01a2e3a9d4dc9cb4871dde4d832a3b8de9f748 (patch)
treee7f65c9f72bc998e2c3ee30df4f191864684938b /fs
parentb3236e68bf86b3ae87f58984a1822369225211cb (diff)
downloadlinux-fsl-qoriq-5a01a2e3a9d4dc9cb4871dde4d832a3b8de9f748.tar.xz
Btrfs: Copy correct tree when inserting into slot 0
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs')
-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 fb2e2bd..cf32651 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;
}