Skip to content

Commit 3e19e6f

Browse files
Christoph Hellwigdjwong
authored andcommitted
iomap: warn on inline maps in iomap_writepage_map
And inline mapping should never mark the page dirty and thus never end up in writepages. Add a check for that condition and warn if it happens. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Dave Chinner <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Signed-off-by: Darrick J. Wong <[email protected]>
1 parent 598ecfb commit 3e19e6f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

fs/iomap/buffered-io.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1415,6 +1415,8 @@ iomap_writepage_map(struct iomap_writepage_ctx *wpc,
14151415
error = wpc->ops->map_blocks(wpc, inode, file_offset);
14161416
if (error)
14171417
break;
1418+
if (WARN_ON_ONCE(wpc->iomap.type == IOMAP_INLINE))
1419+
continue;
14181420
if (wpc->iomap.type == IOMAP_HOLE)
14191421
continue;
14201422
iomap_add_to_ioend(inode, file_offset, page, iop, wpc, wbc,

0 commit comments

Comments
 (0)