From: Christoph Hellwig Date: Thu, 17 Oct 2019 20:12:17 +0000 (-0700) Subject: iomap: warn on inline maps in iomap_writepage_map X-Git-Tag: v5.10.7~3671^2~22 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3e19e6f3eeea26490a84cdd18c7220e640f4837e;p=platform%2Fkernel%2Flinux-rpi.git 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 Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong --- diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c index 41e1828..901c1a7 100644 --- a/fs/iomap/buffered-io.c +++ b/fs/iomap/buffered-io.c @@ -1415,6 +1415,8 @@ iomap_writepage_map(struct iomap_writepage_ctx *wpc, error = wpc->ops->map_blocks(wpc, inode, file_offset); if (error) break; + if (WARN_ON_ONCE(wpc->iomap.type == IOMAP_INLINE)) + continue; if (wpc->iomap.type == IOMAP_HOLE) continue; iomap_add_to_ioend(inode, file_offset, page, iop, wpc, wbc,