Re: [PATCH v2] iomap: Make sure iomap_end is called after iomap_begin

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 23, 2020 at 12:51:00PM +0200, Andreas Gr??nbacher wrote:
> > Yes, it merges the WARN_ONs, and thus reduces their usefulness.  How
> > about a patch that just fixes your reported issue insted of messing up
> > other things for no good reason?
> 
> So you're saying you prefer this:
> 
> +       if (WARN_ON(iomap.offset > pos)) {
> +               written = -EIO;
> +               goto out;
> +       }
> +       if (WARN_ON(iomap.length == 0)) {
> +               written = -EIO;
> +               goto out;
> +       }
> 
> to this:
> 
> +       if (WARN_ON(iomap.offset > pos) ||
> +           WARN_ON(iomap.length == 0)) {
> +               written = -EIO;
> +               goto out;
> +       }
> 
> Well fine, you don't need to accuse me of messing up things for that.

Yes.  And we had discussion on exactly that on the previous iteration..



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux