return 0;
}
+static struct folio *__iomap_get_folio(struct iomap_iter *iter, loff_t pos,
+ size_t len)
+{
+ const struct iomap_page_ops *page_ops = iter->iomap.page_ops;
+
+ if (page_ops && page_ops->page_prepare)
+ return page_ops->page_prepare(iter, pos, len);
+ else
+ return iomap_get_folio(iter, pos);
+}
+
static void __iomap_put_folio(struct iomap_iter *iter, loff_t pos, size_t ret,
struct folio *folio)
{
if (!mapping_large_folio_support(iter->inode->i_mapping))
len = min_t(size_t, len, PAGE_SIZE - offset_in_page(pos));
- if (page_ops && page_ops->page_prepare)
- folio = page_ops->page_prepare(iter, pos, len);
- else
- folio = iomap_get_folio(iter, pos);
+ folio = __iomap_get_folio(iter, pos, len);
if (IS_ERR(folio))
return PTR_ERR(folio);