[Cluster-devel] [PATCH v5 5/9] iomap/gfs2: Get page in page_prepare handler

Andreas Gruenbacher agruenba at redhat.com
Sun Jan 8 19:40:29 UTC 2023


On Sun, Jan 8, 2023 at 6:29 PM Christoph Hellwig <hch at infradead.org> wrote:
> > +     if (page_ops && page_ops->page_prepare)
> > +             folio = page_ops->page_prepare(iter, pos, len);
> > +     else
> > +             folio = iomap_get_folio(iter, pos);
> > +     if (IS_ERR(folio))
> >               return PTR_ERR(folio);
>
> I'd love to have a iomap_get_folio helper for this sequence so that
> we match iomap_put_folio.  That would require renaming the current
> iomap_get_folio to __iomap_get_folio.

That's the wrong way around though. iomap_get_folio() is exported to
filesystems, so if at all, we should rename iomap_put_folio() which is
a static function only used in the iomap code.

I'll post an update.

Thanks,
Andreas



More information about the Cluster-devel mailing list