Now that filler_t and aops->read_folio() have the same type, we can decide
which one to use at the top of the function, and cache ->read_folio in
the filler parameter.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
{
struct folio *folio;
int err;
{
struct folio *folio;
int err;
+
+ if (!filler)
+ filler = mapping->a_ops->read_folio;
repeat:
folio = filemap_get_folio(mapping, index);
if (!folio) {
repeat:
folio = filemap_get_folio(mapping, index);
if (!folio) {
- if (filler)
- err = filler(file, folio);
- else
- err = mapping->a_ops->read_folio(file, folio);
-
+ err = filler(file, folio);
if (err < 0) {
folio_put(folio);
return ERR_PTR(err);
if (err < 0) {
folio_put(folio);
return ERR_PTR(err);