diff options
author | Christoph Hellwig <hch@lst.de> | 2023-12-07 08:26:58 +0100 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2024-02-01 14:20:10 +0100 |
commit | 80d012e98894ac9112cbcddf2fbf276c2e4be0ec (patch) | |
tree | 0d713824fb3df4d76517a13bfb7cd37c4b042a13 /fs/iomap | |
parent | 7ea1d9b4a840c2dd01d1234663d4a8ef256cfe39 (diff) |
iomap: treat inline data in iomap_writepage_map as an I/O error
iomap_writepage_map aready warns about inline data, but then just ignores
it. Treat it as an error and return -EIO.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20231207072710.176093-3-hch@lst.de
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/iomap')
-rw-r--r-- | fs/iomap/buffered-io.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c index 228fd2e05e12..1492706cdc3d 100644 --- a/fs/iomap/buffered-io.c +++ b/fs/iomap/buffered-io.c @@ -1808,8 +1808,10 @@ iomap_writepage_map(struct iomap_writepage_ctx *wpc, if (error) break; trace_iomap_writepage_map(inode, &wpc->iomap); - if (WARN_ON_ONCE(wpc->iomap.type == IOMAP_INLINE)) - continue; + if (WARN_ON_ONCE(wpc->iomap.type == IOMAP_INLINE)) { + error = -EIO; + break; + } if (wpc->iomap.type == IOMAP_HOLE) continue; iomap_add_to_ioend(inode, pos, folio, ifs, wpc, wbc, |