mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-21 11:44:01 +08:00
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 <hch@lst.de> Reviewed-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
This commit is contained in:
parent
598ecfbaa7
commit
3e19e6f3ee
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user