Commit 80d012e9 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Christian Brauner

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: default avatarChristoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20231207072710.176093-3-hch@lst.deSigned-off-by: default avatarChristian Brauner <brauner@kernel.org>
parent 7ea1d9b4
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment