summaryrefslogtreecommitdiffstats
path: root/mm/filemap.c
diff options
context:
space:
mode:
authorVishal Moola (Oracle) <vishal.moola@gmail.com>2022-08-23 17:40:23 -0700
committerAndrew Morton <akpm@linux-foundation.org>2022-09-11 20:26:03 -0700
commit48658d8509d2db3391c95aa74308a2b1fc8e8461 (patch)
treed9cd9d919163bba88eee48f208f100c91dcf479c /mm/filemap.c
parent60aac486daa48d9caa9370d480d890f2a1f71742 (diff)
downloadlinux-stable-48658d8509d2db3391c95aa74308a2b1fc8e8461.tar.gz
linux-stable-48658d8509d2db3391c95aa74308a2b1fc8e8461.tar.bz2
linux-stable-48658d8509d2db3391c95aa74308a2b1fc8e8461.zip
filemap: remove find_get_pages_contig()
All callers of find_get_pages_contig() have been removed, so it is no longer needed. Link: https://lkml.kernel.org/r/20220824004023.77310-8-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) <vishal.moola@gmail.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Chris Mason <clm@fb.com> Cc: David Sterba <dsterba@suse.com> Cc: David Sterba <dsterb@suse.com> Cc: Josef Bacik <josef@toxicpanda.com> Cc: Matthew Wilcox <willy@infradead.org> Cc: Ryusuke Konishi <konishi.ryusuke@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/filemap.c')
-rw-r--r--mm/filemap.c60
1 files changed, 0 insertions, 60 deletions
diff --git a/mm/filemap.c b/mm/filemap.c
index 2a9441afe337..8151890e9a00 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -2270,66 +2270,6 @@ out:
EXPORT_SYMBOL(filemap_get_folios_contig);
/**
- * find_get_pages_contig - gang contiguous pagecache lookup
- * @mapping: The address_space to search
- * @index: The starting page index
- * @nr_pages: The maximum number of pages
- * @pages: Where the resulting pages are placed
- *
- * find_get_pages_contig() works exactly like find_get_pages_range(),
- * except that the returned number of pages are guaranteed to be
- * contiguous.
- *
- * Return: the number of pages which were found.
- */
-unsigned find_get_pages_contig(struct address_space *mapping, pgoff_t index,
- unsigned int nr_pages, struct page **pages)
-{
- XA_STATE(xas, &mapping->i_pages, index);
- struct folio *folio;
- unsigned int ret = 0;
-
- if (unlikely(!nr_pages))
- return 0;
-
- rcu_read_lock();
- for (folio = xas_load(&xas); folio; folio = xas_next(&xas)) {
- if (xas_retry(&xas, folio))
- continue;
- /*
- * If the entry has been swapped out, we can stop looking.
- * No current caller is looking for DAX entries.
- */
- if (xa_is_value(folio))
- break;
-
- if (!folio_try_get_rcu(folio))
- goto retry;
-
- if (unlikely(folio != xas_reload(&xas)))
- goto put_page;
-
-again:
- pages[ret] = folio_file_page(folio, xas.xa_index);
- if (++ret == nr_pages)
- break;
- if (folio_more_pages(folio, xas.xa_index, ULONG_MAX)) {
- xas.xa_index++;
- folio_ref_inc(folio);
- goto again;
- }
- continue;
-put_page:
- folio_put(folio);
-retry:
- xas_reset(&xas);
- }
- rcu_read_unlock();
- return ret;
-}
-EXPORT_SYMBOL(find_get_pages_contig);
-
-/**
* find_get_pages_range_tag - Find and return head pages matching @tag.
* @mapping: the address_space to search
* @index: the starting page index