Commit 3e19e6f3 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Darrick J. Wong

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: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarDave Chinner <dchinner@redhat.com>
Reviewed-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
parent 598ecfba
...@@ -1415,6 +1415,8 @@ iomap_writepage_map(struct iomap_writepage_ctx *wpc, ...@@ -1415,6 +1415,8 @@ iomap_writepage_map(struct iomap_writepage_ctx *wpc,
error = wpc->ops->map_blocks(wpc, inode, file_offset); error = wpc->ops->map_blocks(wpc, inode, file_offset);
if (error) if (error)
break; break;
if (WARN_ON_ONCE(wpc->iomap.type == IOMAP_INLINE))
continue;
if (wpc->iomap.type == IOMAP_HOLE) if (wpc->iomap.type == IOMAP_HOLE)
continue; continue;
iomap_add_to_ioend(inode, file_offset, page, iop, wpc, wbc, iomap_add_to_ioend(inode, file_offset, page, iop, 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