diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2019-05-13 20:23:20 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-05-14 12:47:51 -0400 |
commit | a1b8e6abf35b9903807eced67a4c26e440663620 (patch) | |
tree | 77f749b529f5de22f0c3242964a16c60dea52e4a | |
parent | b3b07077b01ecbbd98efede778c195567de25b71 (diff) |
mm: delete find_get_entries_tag
I removed the only user of this and hadn't noticed it was now unused.
Link: http://lkml.kernel.org/r/20190430152929.21813-1-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Ross Zwisler <zwisler@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | include/linux/pagemap.h | 3 | ||||
-rw-r--r-- | mm/filemap.c | 61 |
2 files changed, 0 insertions, 64 deletions
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index 112f15bb5907..9ec3544baee2 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h | |||
@@ -373,9 +373,6 @@ static inline unsigned find_get_pages_tag(struct address_space *mapping, | |||
373 | return find_get_pages_range_tag(mapping, index, (pgoff_t)-1, tag, | 373 | return find_get_pages_range_tag(mapping, index, (pgoff_t)-1, tag, |
374 | nr_pages, pages); | 374 | nr_pages, pages); |
375 | } | 375 | } |
376 | unsigned find_get_entries_tag(struct address_space *mapping, pgoff_t start, | ||
377 | xa_mark_t tag, unsigned int nr_entries, | ||
378 | struct page **entries, pgoff_t *indices); | ||
379 | 376 | ||
380 | struct page *grab_cache_page_write_begin(struct address_space *mapping, | 377 | struct page *grab_cache_page_write_begin(struct address_space *mapping, |
381 | pgoff_t index, unsigned flags); | 378 | pgoff_t index, unsigned flags); |
diff --git a/mm/filemap.c b/mm/filemap.c index 3ad18fa56057..c5af80c43d36 100644 --- a/mm/filemap.c +++ b/mm/filemap.c | |||
@@ -1941,67 +1941,6 @@ out: | |||
1941 | } | 1941 | } |
1942 | EXPORT_SYMBOL(find_get_pages_range_tag); | 1942 | EXPORT_SYMBOL(find_get_pages_range_tag); |
1943 | 1943 | ||
1944 | /** | ||
1945 | * find_get_entries_tag - find and return entries that match @tag | ||
1946 | * @mapping: the address_space to search | ||
1947 | * @start: the starting page cache index | ||
1948 | * @tag: the tag index | ||
1949 | * @nr_entries: the maximum number of entries | ||
1950 | * @entries: where the resulting entries are placed | ||
1951 | * @indices: the cache indices corresponding to the entries in @entries | ||
1952 | * | ||
1953 | * Like find_get_entries, except we only return entries which are tagged with | ||
1954 | * @tag. | ||
1955 | * | ||
1956 | * Return: the number of entries which were found. | ||
1957 | */ | ||
1958 | unsigned find_get_entries_tag(struct address_space *mapping, pgoff_t start, | ||
1959 | xa_mark_t tag, unsigned int nr_entries, | ||
1960 | struct page **entries, pgoff_t *indices) | ||
1961 | { | ||
1962 | XA_STATE(xas, &mapping->i_pages, start); | ||
1963 | struct page *page; | ||
1964 | unsigned int ret = 0; | ||
1965 | |||
1966 | if (!nr_entries) | ||
1967 | return 0; | ||
1968 | |||
1969 | rcu_read_lock(); | ||
1970 | xas_for_each_marked(&xas, page, ULONG_MAX, tag) { | ||
1971 | if (xas_retry(&xas, page)) | ||
1972 | continue; | ||
1973 | /* | ||
1974 | * A shadow entry of a recently evicted page, a swap | ||
1975 | * entry from shmem/tmpfs or a DAX entry. Return it | ||
1976 | * without attempting to raise page count. | ||
1977 | */ | ||
1978 | if (xa_is_value(page)) | ||
1979 | goto export; | ||
1980 | |||
1981 | if (!page_cache_get_speculative(page)) | ||
1982 | goto retry; | ||
1983 | |||
1984 | /* Has the page moved or been split? */ | ||
1985 | if (unlikely(page != xas_reload(&xas))) | ||
1986 | goto put_page; | ||
1987 | page = find_subpage(page, xas.xa_index); | ||
1988 | |||
1989 | export: | ||
1990 | indices[ret] = xas.xa_index; | ||
1991 | entries[ret] = page; | ||
1992 | if (++ret == nr_entries) | ||
1993 | break; | ||
1994 | continue; | ||
1995 | put_page: | ||
1996 | put_page(page); | ||
1997 | retry: | ||
1998 | xas_reset(&xas); | ||
1999 | } | ||
2000 | rcu_read_unlock(); | ||
2001 | return ret; | ||
2002 | } | ||
2003 | EXPORT_SYMBOL(find_get_entries_tag); | ||
2004 | |||
2005 | /* | 1944 | /* |
2006 | * CD/DVDs are error prone. When a medium error occurs, the driver may fail | 1945 | * CD/DVDs are error prone. When a medium error occurs, the driver may fail |
2007 | * a _large_ part of the i/o request. Imagine the worst scenario: | 1946 | * a _large_ part of the i/o request. Imagine the worst scenario: |