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.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index 7c10a90362ff..7cbf8d8d7e27 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -591,8 +591,7 @@ next_slot:
591 } 591 }
592 } 592 }
593 bookend = 1; 593 bookend = 1;
594 if (found_inline && start <= key.offset && 594 if (found_inline && start <= key.offset)
595 inline_limit < extent_end)
596 keep = 1; 595 keep = 1;
597 } 596 }
598 /* truncate existing extent */ 597 /* truncate existing extent */
@@ -672,11 +671,10 @@ next_slot:
672 if (!bookend) 671 if (!bookend)
673 continue; 672 continue;
674 } 673 }
675 if (bookend && found_inline && start <= key.offset && 674 if (bookend && found_inline && start <= key.offset) {
676 inline_limit < extent_end && key.offset <= inline_limit) {
677 u32 new_size; 675 u32 new_size;
678 new_size = btrfs_file_extent_calc_inline_size( 676 new_size = btrfs_file_extent_calc_inline_size(
679 extent_end - inline_limit); 677 extent_end - end);
680 btrfs_truncate_item(trans, root, path, new_size, 0); 678 btrfs_truncate_item(trans, root, path, new_size, 0);
681 } 679 }
682 /* create bookend, splitting the extent in two */ 680 /* create bookend, splitting the extent in two */