> diff --git a/fs/iomap.c b/fs/iomap.c > index e5de772..aec35a0 100644 > --- a/fs/iomap.c > +++ b/fs/iomap.c > @@ -63,7 +63,7 @@ iomap_apply(struct inode *inode, loff_t pos, loff_t length, unsigned flags, > ret = ops->iomap_begin(inode, pos, length, flags, &iomap); > if (ret) > return ret; > - if (WARN_ON(iomap.offset > pos)) > + if (WARN_ON(iomap.offset > pos) || WARN_ON(iomap.length == 0)) > return -EIO; > > /* Please split this into a separate patch. Otherwise this looks fine: Reviewed-by: Christoph Hellwig <hch@xxxxxx> -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html