aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/file.c')
-rw-r--r--fs/btrfs/file.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index dc78954861b3..c80075497645 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -643,7 +643,9 @@ next_slot:
643 643
644 if (disk_bytenr != 0) { 644 if (disk_bytenr != 0) {
645 ret = btrfs_update_extent_ref(trans, root, 645 ret = btrfs_update_extent_ref(trans, root,
646 disk_bytenr, orig_parent, 646 disk_bytenr,
647 le64_to_cpu(old.disk_num_bytes),
648 orig_parent,
647 leaf->start, 649 leaf->start,
648 root->root_key.objectid, 650 root->root_key.objectid,
649 trans->transid, ins.objectid); 651 trans->transid, ins.objectid);
@@ -912,7 +914,7 @@ again:
912 btrfs_set_file_extent_other_encoding(leaf, fi, 0); 914 btrfs_set_file_extent_other_encoding(leaf, fi, 0);
913 915
914 if (orig_parent != leaf->start) { 916 if (orig_parent != leaf->start) {
915 ret = btrfs_update_extent_ref(trans, root, bytenr, 917 ret = btrfs_update_extent_ref(trans, root, bytenr, num_bytes,
916 orig_parent, leaf->start, 918 orig_parent, leaf->start,
917 root->root_key.objectid, 919 root->root_key.objectid,
918 trans->transid, inode->i_ino); 920 trans->transid, inode->i_ino);