Re: [PATCH 09/10] iomap: remove unnecessary advance from iomap_iter()

Brian Foster
2025-02-13T15:25:35Z

On Wed, Feb 12, 2025 at 10:59:44PM -0800, Christoph Hellwig wrote:
> On Wed, Feb 12, 2025 at 08:57:11AM -0500, Brian Foster wrote:
> > + ret = (iter->len > 0) ? 1 : 0;
> > + if (iter->processed < 0)
> > + ret = iter->processed;
> > + else if (!advanced && !stale)
> > ret = 0;
>
> Maybe reshuffle this a bit as:
>
> if (iter->processed < 0)
> ret = iter->processed;
> else if (iter->len == 0 || (!advanced && !stale))
> ret = 0;
> else
> ret = 1;
>
> Otherwise this looks great!
>

Ack, I like that better. Thanks for the feedback.

Brian