]> Gentwo Git Trees - linux/.git/commit
iomap: account for unaligned end offsets when truncating read range
authorJoanne Koong <joannelkoong@gmail.com>
Tue, 11 Nov 2025 19:36:51 +0000 (11:36 -0800)
committerChristian Brauner <brauner@kernel.org>
Wed, 12 Nov 2025 09:50:31 +0000 (10:50 +0100)
commit9d875e0eef8ec15b6b1da0cb9a0f8ed13efee89e
tree495218333e496345cab1c340223e87f1c221ea8f
parenta0f1cabe294c914ef58a414dce0de5c46a767bb5
iomap: account for unaligned end offsets when truncating read range

The end position to start truncating from may be at an offset into a
block, which under the current logic would result in overtruncation.

Adjust the calculation to account for unaligned end offsets.

Signed-off-by: Joanne Koong <joannelkoong@gmail.com>
Link: https://patch.msgid.link/20251111193658.3495942-3-joannelkoong@gmail.com
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/iomap/buffered-io.c