Re: [PATCH 3/5] fs/buffer: add a for_each_bh() for block_read_full_folio()

Matthew Wilcox
2024-12-18T19:20:30Z

On Tue, Dec 17, 2024 at 06:26:24PM -0800, Luis Chamberlain wrote:
> /* Stage one - collect buffer heads we need issue a read for */
> - do {
> - if (buffer_uptodate(bh))
> + for_each_bh(bh, head) {
> + if (buffer_uptodate(bh)) {
> + iblock++;
> continue;
> + }

I'm not loving this. It's fragile to have to put 'iblock++' before each
continue.