The last user of this function is btrfs, which has migrated to use bdev_rw_virt(). So there is no need to keep that function. Signed-off-by: Qu Wenruo --- include/linux/pagemap.h | 2 -- mm/filemap.c | 23 ----------------------- 2 files changed, 25 deletions(-) diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index 31a848485ad9..2efbf6c55a96 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h @@ -1002,8 +1002,6 @@ struct folio *mapping_read_folio_gfp(struct address_space *, pgoff_t index, gfp_t flags); struct page *read_cache_page(struct address_space *, pgoff_t index, filler_t *filler, struct file *file); -extern struct page * read_cache_page_gfp(struct address_space *mapping, - pgoff_t index, gfp_t gfp_mask); static inline struct page *read_mapping_page(struct address_space *mapping, pgoff_t index, struct file *file) diff --git a/mm/filemap.c b/mm/filemap.c index ebd75684cb0a..cd167aa45934 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -4173,29 +4173,6 @@ struct page *read_cache_page(struct address_space *mapping, } EXPORT_SYMBOL(read_cache_page); -/** - * read_cache_page_gfp - read into page cache, using specified page allocation flags. - * @mapping: the page's address_space - * @index: the page index - * @gfp: the page allocator flags to use if allocating - * - * This is the same as "read_mapping_page(mapping, index, NULL)", but with - * any new page allocations done using the specified allocation flags. - * - * If the page does not get brought uptodate, return -EIO. - * - * The function expects mapping->invalidate_lock to be already held. - * - * Return: up to date page on success, ERR_PTR() on failure. - */ -struct page *read_cache_page_gfp(struct address_space *mapping, - pgoff_t index, - gfp_t gfp) -{ - return do_read_cache_page(mapping, index, NULL, NULL, gfp); -} -EXPORT_SYMBOL(read_cache_page_gfp); - /* * Warn about a page cache invalidation failure during a direct I/O write. */ -- 2.52.0