VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: Christoph Hellwig <hch@lst.de> 2019-10-17 13:12:17 -0700 committer: Darrick J. Wong <darrick.wong@oracle.com> 2019-10-21 08:51:59 -0700 commit: 3e19e6f3eeea26490a84cdd18c7220e640f4837e parent: 598ecfbaa742aca0dcdbbea25681406f95cc0b63
Commit Summary:
iomap: warn on inline maps in iomap_writepage_map
Diffstat:
1 file changed, 2 insertions, 0 deletions
diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c
index 41e1828a0bb3..901c1a799238 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,