mm: remove the pages argument to read_pages
This is always an empty list or NULL with the removal of the ->readahead support, so remove it. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Al Viro <viro@zeniv.linux.org.uk> Acked-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
This commit is contained in:
parent
704528d895
commit
dfd8b4fc76
@ -142,8 +142,7 @@ file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping)
|
|||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(file_ra_state_init);
|
EXPORT_SYMBOL_GPL(file_ra_state_init);
|
||||||
|
|
||||||
static void read_pages(struct readahead_control *rac, struct list_head *pages,
|
static void read_pages(struct readahead_control *rac, bool skip_page)
|
||||||
bool skip_page)
|
|
||||||
{
|
{
|
||||||
const struct address_space_operations *aops = rac->mapping->a_ops;
|
const struct address_space_operations *aops = rac->mapping->a_ops;
|
||||||
struct page *page;
|
struct page *page;
|
||||||
@ -179,7 +178,6 @@ static void read_pages(struct readahead_control *rac, struct list_head *pages,
|
|||||||
|
|
||||||
blk_finish_plug(&plug);
|
blk_finish_plug(&plug);
|
||||||
|
|
||||||
BUG_ON(pages && !list_empty(pages));
|
|
||||||
BUG_ON(readahead_count(rac));
|
BUG_ON(readahead_count(rac));
|
||||||
|
|
||||||
out:
|
out:
|
||||||
@ -206,7 +204,6 @@ void page_cache_ra_unbounded(struct readahead_control *ractl,
|
|||||||
{
|
{
|
||||||
struct address_space *mapping = ractl->mapping;
|
struct address_space *mapping = ractl->mapping;
|
||||||
unsigned long index = readahead_index(ractl);
|
unsigned long index = readahead_index(ractl);
|
||||||
LIST_HEAD(page_pool);
|
|
||||||
gfp_t gfp_mask = readahead_gfp_mask(mapping);
|
gfp_t gfp_mask = readahead_gfp_mask(mapping);
|
||||||
unsigned long i;
|
unsigned long i;
|
||||||
|
|
||||||
@ -238,7 +235,7 @@ void page_cache_ra_unbounded(struct readahead_control *ractl,
|
|||||||
* have a stable reference to this page, and it's
|
* have a stable reference to this page, and it's
|
||||||
* not worth getting one just for that.
|
* not worth getting one just for that.
|
||||||
*/
|
*/
|
||||||
read_pages(ractl, &page_pool, true);
|
read_pages(ractl, true);
|
||||||
i = ractl->_index + ractl->_nr_pages - index - 1;
|
i = ractl->_index + ractl->_nr_pages - index - 1;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -249,7 +246,7 @@ void page_cache_ra_unbounded(struct readahead_control *ractl,
|
|||||||
if (filemap_add_folio(mapping, folio, index + i,
|
if (filemap_add_folio(mapping, folio, index + i,
|
||||||
gfp_mask) < 0) {
|
gfp_mask) < 0) {
|
||||||
folio_put(folio);
|
folio_put(folio);
|
||||||
read_pages(ractl, &page_pool, true);
|
read_pages(ractl, true);
|
||||||
i = ractl->_index + ractl->_nr_pages - index - 1;
|
i = ractl->_index + ractl->_nr_pages - index - 1;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -263,7 +260,7 @@ void page_cache_ra_unbounded(struct readahead_control *ractl,
|
|||||||
* uptodate then the caller will launch readpage again, and
|
* uptodate then the caller will launch readpage again, and
|
||||||
* will then handle the error.
|
* will then handle the error.
|
||||||
*/
|
*/
|
||||||
read_pages(ractl, &page_pool, false);
|
read_pages(ractl, false);
|
||||||
filemap_invalidate_unlock_shared(mapping);
|
filemap_invalidate_unlock_shared(mapping);
|
||||||
memalloc_nofs_restore(nofs);
|
memalloc_nofs_restore(nofs);
|
||||||
}
|
}
|
||||||
@ -537,7 +534,7 @@ void page_cache_ra_order(struct readahead_control *ractl,
|
|||||||
ra->async_size += index - limit - 1;
|
ra->async_size += index - limit - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
read_pages(ractl, NULL, false);
|
read_pages(ractl, false);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If there were already pages in the page cache, then we may have
|
* If there were already pages in the page cache, then we may have
|
||||||
|
Loading…
x
Reference in New Issue
Block a user