]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
iomap: error out on file IO when there is no inline_data buffer
authorDarrick J. Wong <djwong@kernel.org>
Tue, 16 Sep 2025 15:00:45 +0000 (08:00 -0700)
committerChristian Brauner <brauner@kernel.org>
Fri, 19 Sep 2025 12:17:11 +0000 (14:17 +0200)
commit6a96fb653b6481ec73e9627ade216b299e4de9ea
tree7c3703bcf58e1778e88ac741ffd29629dd53a4c2
parent231af8c14f0f1574ce5d5e66b48f0087a6a764e3
iomap: error out on file IO when there is no inline_data buffer

Return IO errors if an ->iomap_begin implementation returns an
IOMAP_INLINE buffer but forgets to set the inline_data pointer.
Filesystems should never do this, but we could help fs developers (me)
fix their bugs by handling this more gracefully than crashing the
kernel.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Link: https://lore.kernel.org/175803480324.966383.7414345025943296442.stgit@frogsfrogsfrogs
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/iomap/buffered-io.c
fs/iomap/direct-io.c