linux/fs/iomap
Darrick J. Wong d320f160aa
iomap: reject delalloc mappings during writeback
Filesystems should never provide a delayed allocation mapping to
writeback; they're supposed to allocate the space before replying.
This can lead to weird IO errors and crashes in the block layer if the
filesystem is being malicious, or if it hadn't set iomap->dev because
it's a delalloc mapping.

Fix this by failing writeback on delalloc mappings.  Currently no
filesystems actually misbehave in this manner, but we ought to be
stricter about things like that.

Cc: stable@vger.kernel.org # v5.5
Fixes: 598ecfbaa7 ("iomap: lift the xfs writeback code to iomap")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Link: https://patch.msgid.link/20260302173002.GL13829@frogsfrogsfrogs
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
2026-03-04 14:31:56 +01:00
..
bio.c iomap: move buffered io bio logic into new file 2025-11-05 12:57:23 +01:00
buffered-io.c iomap: don't mark folio uptodate if read IO has bytes pending 2026-03-04 14:18:54 +01:00
direct-io.c iomap: don't report direct-io retries to fserror 2026-02-26 09:23:22 +01:00
fiemap.c iomap: header diet 2025-07-14 10:51:31 +02:00
internal.h iomap: move buffered io bio logic into new file 2025-11-05 12:57:23 +01:00
ioend.c iomap: reject delalloc mappings during writeback 2026-03-04 14:31:56 +01:00
iter.c iomap: replace folio_batch allocation with stack allocation 2025-12-15 15:17:44 +01:00
Makefile iomap: move buffered io bio logic into new file 2025-11-05 12:57:23 +01:00
seek.c iomap: simplify iomap_iter_advance() 2025-10-20 20:21:25 +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: add IOMAP_DIO_FSBLOCK_ALIGNED flag 2025-11-05 13:09:27 +01:00