Re: [PATCH 06/12] writeback: Use the folio_batch queue iterator

From: Christoph Hellwig
Date: Tue Jun 27 2023 - 00:26:57 EST


On Mon, Jun 26, 2023 at 06:35:15PM +0100, Matthew Wilcox (Oracle) wrote:
> Instead of keeping our own local iterator variable, use the one just
> added to folio_batch.

Ok, that's a slightly different twist to what I just suggested.

> for (;;) {
> - struct folio *folio;
> + struct folio *folio = writeback_get_next(mapping, wbc);
>
> + if (!folio)
> break;

But as a purely cosmetic nit I still think this would read nicer as:

while ((folio = writeback_get_next(mapping, wbc))) {