Re: [RFC v2 02/11] fs/buffer: add a for_each_bh() for block_read_full_folio()

Matthew Wilcox
2024-12-14T04:03:04Z

On Fri, Dec 13, 2024 at 07:10:40PM -0800, Luis Chamberlain wrote:
> - do {
> + for_each_bh(bh, head) {
> if (buffer_uptodate(bh))
> continue;
>
> @@ -2454,7 +2464,9 @@ int block_read_full_folio(struct folio *folio, get_block_t *get_block)
> continue;
> }
> arr[nr++] = bh;
> - } while (i++, iblock++, (bh = bh->b_this_page) != head);
> + i++;
> + iblock++;
> + }

This is non-equivalent. That 'continue' you can see would increment i
and iblock. Now it doesn't.