Skip to content

Commit dfd8b4f

Browse files
Christoph HellwigMatthew Wilcox (Oracle)
authored andcommitted
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>
1 parent 704528d commit dfd8b4f

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

mm/readahead.c

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,7 @@ file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping)
142142
}
143143
EXPORT_SYMBOL_GPL(file_ra_state_init);
144144

145-
static void read_pages(struct readahead_control *rac, struct list_head *pages,
146-
bool skip_page)
145+
static void read_pages(struct readahead_control *rac, bool skip_page)
147146
{
148147
const struct address_space_operations *aops = rac->mapping->a_ops;
149148
struct page *page;
@@ -179,7 +178,6 @@ static void read_pages(struct readahead_control *rac, struct list_head *pages,
179178

180179
blk_finish_plug(&plug);
181180

182-
BUG_ON(pages && !list_empty(pages));
183181
BUG_ON(readahead_count(rac));
184182

185183
out:
@@ -206,7 +204,6 @@ void page_cache_ra_unbounded(struct readahead_control *ractl,
206204
{
207205
struct address_space *mapping = ractl->mapping;
208206
unsigned long index = readahead_index(ractl);
209-
LIST_HEAD(page_pool);
210207
gfp_t gfp_mask = readahead_gfp_mask(mapping);
211208
unsigned long i;
212209

@@ -238,7 +235,7 @@ void page_cache_ra_unbounded(struct readahead_control *ractl,
238235
* have a stable reference to this page, and it's
239236
* not worth getting one just for that.
240237
*/
241-
read_pages(ractl, &page_pool, true);
238+
read_pages(ractl, true);
242239
i = ractl->_index + ractl->_nr_pages - index - 1;
243240
continue;
244241
}
@@ -249,7 +246,7 @@ void page_cache_ra_unbounded(struct readahead_control *ractl,
249246
if (filemap_add_folio(mapping, folio, index + i,
250247
gfp_mask) < 0) {
251248
folio_put(folio);
252-
read_pages(ractl, &page_pool, true);
249+
read_pages(ractl, true);
253250
i = ractl->_index + ractl->_nr_pages - index - 1;
254251
continue;
255252
}
@@ -263,7 +260,7 @@ void page_cache_ra_unbounded(struct readahead_control *ractl,
263260
* uptodate then the caller will launch readpage again, and
264261
* will then handle the error.
265262
*/
266-
read_pages(ractl, &page_pool, false);
263+
read_pages(ractl, false);
267264
filemap_invalidate_unlock_shared(mapping);
268265
memalloc_nofs_restore(nofs);
269266
}
@@ -537,7 +534,7 @@ void page_cache_ra_order(struct readahead_control *ractl,
537534
ra->async_size += index - limit - 1;
538535
}
539536

540-
read_pages(ractl, NULL, false);
537+
read_pages(ractl, false);
541538

542539
/*
543540
* If there were already pages in the page cache, then we may have

0 commit comments

Comments
 (0)