On Wed, Jun 17, 2020 at 06:39:01PM -0700, Darrick J. Wong wrote: > > - if (WARN_ON(iomap.offset > pos)) > > - return -EIO; > > - if (WARN_ON(iomap.length == 0)) > > - return -EIO; > > + if (WARN_ON(iomap.offset > pos) || WARN_ON(iomap.length == 0)) { > > Why combine these WARN_ON? Before, you could distinguish between your > iomap_begin method returning zero length vs. bad offset. Does it matter? They're both the same problem -- the filesystem has returned an invalid iomap. I'd go further and combine the two: if (WARN_ON(iomap.offset > pos || iomap.length == 0)) { that'll save a few bytes of .text