Skip to content

Commit d797576

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 42565d8 commit d797576

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
@@ -4822,10 +4822,10 @@ static int zero_range_folio(struct btrfs_inode *inode, u64 from, u64 end,
48224822
orig_end);
48234823
block_start = round_down(clamp_start, blocksize);
48244824
block_end = round_up(clamp_end + 1, blocksize) - 1;
4825-
lock_extent(io_tree, block_start, block_end, &cached_state);
4825+
btrfs_lock_extent(io_tree, block_start, block_end, &cached_state);
48264826
ordered = btrfs_lookup_ordered_range(inode, block_start, block_end + 1 - block_end);
48274827
if (ordered) {
4828-
unlock_extent(io_tree, block_start, block_end, &cached_state);
4828+
btrfs_unlock_extent(io_tree, block_start, block_end, &cached_state);
48294829
folio_unlock(folio);
48304830
folio_put(folio);
48314831
btrfs_start_ordered_extent(ordered);
@@ -4834,7 +4834,7 @@ static int zero_range_folio(struct btrfs_inode *inode, u64 from, u64 end,
48344834
}
48354835
folio_zero_range(folio, clamp_start - folio_pos(folio),
48364836
clamp_end - clamp_start + 1);
4837-
unlock_extent(io_tree, block_start, block_end, &cached_state);
4837+
btrfs_unlock_extent(io_tree, block_start, block_end, &cached_state);
48384838

48394839
out_unlock:
48404840
folio_unlock(folio);

0 commit comments

Comments
 (0)