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>
This commit is contained in:
Christoph Hellwig 2023-12-07 08:26:58 +01:00 committed by Christian Brauner
parent 7ea1d9b4a8
commit 80d012e988
1 changed files with 4 additions and 2 deletions

View File

@ -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,