linux/fs/iomap
Joanne Koong bfa4924cbc iomap: account for unaligned end offsets when truncating read range
[ Upstream commit 9d875e0eef ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2026-01-02 12:56:38 +01:00
..
buffered-io.c iomap: account for unaligned end offsets when truncating read range 2026-01-02 12:56:38 +01:00
direct-io.c iomap: allocate s_dio_done_wq for async reads as well 2025-12-18 14:03:17 +01:00
fiemap.c iomap: header diet 2025-07-14 10:51:31 +02:00
internal.h iomap: move all ioend handling to ioend.c 2025-07-14 10:51:32 +02:00
ioend.c iomap: move all ioend handling to ioend.c 2025-07-14 10:51:32 +02:00
iter.c iomap: header diet 2025-07-14 10:51:31 +02:00
Makefile iomap: build the writeback code without CONFIG_BLOCK 2025-07-14 10:51:33 +02:00
seek.c iomap: header diet 2025-07-14 10:51:31 +02:00
swapfile.c iomap: header diet 2025-07-14 10:51:31 +02:00
trace.c iomap: header diet 2025-07-14 10:51:31 +02:00
trace.h iomap: trace iomap_zero_iter zeroing activities 2025-09-19 14:17:11 +02:00