diff options
Diffstat (limited to 'mm/folio-compat.c')
-rw-r--r-- | mm/folio-compat.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/folio-compat.c b/mm/folio-compat.c index a71523a06ccd..c6f056c20503 100644 --- a/mm/folio-compat.c +++ b/mm/folio-compat.c @@ -97,8 +97,8 @@ struct page *pagecache_get_page(struct address_space *mapping, pgoff_t index, struct folio *folio; folio = __filemap_get_folio(mapping, index, fgp_flags, gfp); - if (!folio || xa_is_value(folio)) - return &folio->page; + if (IS_ERR(folio)) + return NULL; return folio_file_page(folio, index); } EXPORT_SYMBOL(pagecache_get_page); |