Skip to content

Commit 80d012e

Browse files
Christoph Hellwigbrauner
authored andcommitted
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>
1 parent 7ea1d9b commit 80d012e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

fs/iomap/buffered-io.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1808,8 +1808,10 @@ iomap_writepage_map(struct iomap_writepage_ctx *wpc,
18081808
if (error)
18091809
break;
18101810
trace_iomap_writepage_map(inode, &wpc->iomap);
1811-
if (WARN_ON_ONCE(wpc->iomap.type == IOMAP_INLINE))
1812-
continue;
1811+
if (WARN_ON_ONCE(wpc->iomap.type == IOMAP_INLINE)) {
1812+
error = -EIO;
1813+
break;
1814+
}
18131815
if (wpc->iomap.type == IOMAP_HOLE)
18141816
continue;
18151817
iomap_add_to_ioend(inode, pos, folio, ifs, wpc, wbc,

0 commit comments

Comments
 (0)