diff --git a/mm/filemap.c b/mm/filemap.c index 81a0ed08a82c3eb818c3da18e6bf2597a7fee7d5..9b7fa47feb5e63be595240ae9ee9935df8272b68 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -3487,6 +3487,9 @@ static struct folio *do_read_cache_folio(struct address_space *mapping, { struct folio *folio; int err; + + if (!filler) + filler = mapping->a_ops->read_folio; repeat: folio = filemap_get_folio(mapping, index); if (!folio) { @@ -3503,11 +3506,7 @@ static struct folio *do_read_cache_folio(struct address_space *mapping, } filler: - 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);