On Mon, Sep 08, 2025 at 11:51:09AM -0700, Joanne Koong wrote: > The purpose of struct iomap_readpage_ctx's cur_folio_in_bio is to track > whether the folio is owned by the bio (where thus the bio is responsible > for unlocking the folio) or if it needs to be unlocked by iomap. Rename > this to folio_owned to make the purpose more clear and so that when > iomap read/readahead logic is made generic, the name also makes sense > for filesystems that don't use bios. > > Signed-off-by: Joanne Koong <joannelkoong@xxxxxxxxx> > --- > fs/iomap/buffered-io.c | 17 +++++++++++------ > 1 file changed, 11 insertions(+), 6 deletions(-) > > diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c > index a3b02ed5328f..598998269107 100644 > --- a/fs/iomap/buffered-io.c > +++ b/fs/iomap/buffered-io.c > @@ -352,7 +352,12 @@ static void iomap_read_end_io(struct bio *bio) > > struct iomap_readpage_ctx { > struct folio *cur_folio; > - bool cur_folio_in_bio; > + /* > + * Is the folio owned by this readpage context, or by some > + * external IO helper? Either way, the owner of the folio is > + * responsible for unlocking it when the read completes. > + */ Nit: you can use up to 80 characters for you comments. Otherwise this looks good.