Skip to content

Commit 6fcb226

Browse files
committed
fixup! btrfs: make btrfs_truncate_block() zero folio range for certain subpage corner cases
Signed-off-by: David Sterba <dsterba@suse.com>
1 parent 901c7a4 commit 6fcb226

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

fs/btrfs/inode.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4813,10 +4813,10 @@ static int zero_range_folio(struct btrfs_inode *inode, u64 from, u64 end,
48134813
orig_end);
48144814
block_start = round_down(clamp_start, blocksize);
48154815
block_end = round_up(clamp_end + 1, blocksize) - 1;
4816-
lock_extent(io_tree, block_start, block_end, &cached_state);
4816+
btrfs_lock_extent(io_tree, block_start, block_end, &cached_state);
48174817
ordered = btrfs_lookup_ordered_range(inode, block_start, block_end + 1 - block_end);
48184818
if (ordered) {
4819-
unlock_extent(io_tree, block_start, block_end, &cached_state);
4819+
btrfs_unlock_extent(io_tree, block_start, block_end, &cached_state);
48204820
folio_unlock(folio);
48214821
folio_put(folio);
48224822
btrfs_start_ordered_extent(ordered);
@@ -4825,7 +4825,7 @@ static int zero_range_folio(struct btrfs_inode *inode, u64 from, u64 end,
48254825
}
48264826
folio_zero_range(folio, clamp_start - folio_pos(folio),
48274827
clamp_end - clamp_start + 1);
4828-
unlock_extent(io_tree, block_start, block_end, &cached_state);
4828+
btrfs_unlock_extent(io_tree, block_start, block_end, &cached_state);
48294829

48304830
out_unlock:
48314831
folio_unlock(folio);

0 commit comments

Comments
 (0)