提交 3e19e6f3 编写于 作者: C Christoph Hellwig 提交者: 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: NChristoph Hellwig <hch@lst.de>
Reviewed-by: NDave Chinner <dchinner@redhat.com>
Reviewed-by: NDarrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: NDarrick J. Wong <darrick.wong@oracle.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部