]> git.ipfire.org Git - thirdparty/linux.git/commit
btrfs: simplify range end calculations in truncate_block_zero_beyond_eof()
authorDavid Sterba <dsterba@suse.com>
Tue, 10 Jun 2025 12:17:48 +0000 (14:17 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 21 Jul 2025 21:58:01 +0000 (23:58 +0200)
commite47c8a47670dbb71bbeeb6cd91f6697106acd742
tree5aa56b0e11acb1582b65b86ef00f434b49083361
parentbdd01fb0364725081d6e938b8b3e647ee48e97eb
btrfs: simplify range end calculations in truncate_block_zero_beyond_eof()

The way zero_end is calculated and used does a -1 and +1 that
effectively cancel out, so this can be simplified. This is also
preparatory patch for using a helper for folio_pos + folio_size with the
semantics of exclusive end of the range.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/inode.c