diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 9c938ff0f98645250ae20e2d1d5f6413a1a4c193..4c9cd5e994cf37c046487cd13a1e69db2a269f65 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -3480,7 +3480,7 @@ static int ext4_iomap_overwrite_begin(struct inode *inode, loff_t offset, */ flags &= ~IOMAP_WRITE; ret = ext4_iomap_begin(inode, offset, length, flags, iomap, srcmap); - WARN_ON_ONCE(iomap->type != IOMAP_MAPPED); + WARN_ON_ONCE(!ret && iomap->type != IOMAP_MAPPED); return ret; }