Skip to content

Commit 3e2faa0

Browse files
Fabian Fredericktorvalds
authored andcommitted
mm/readahead.c: remove unused file_ra_state from count_history_pages
count_history_pages does only call page_cache_prev_hole in rcu_lock context using address_space mapping. There's no need to have file_ra_state here. Signed-off-by: Fabian Frederick <fabf@skynet.be> Acked-by: Fengguang Wu <fengguang.wu@intel.com> Acked-by: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent c42e571 commit 3e2faa0

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎mm/readahead.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,6 @@ static unsigned long get_next_ra_size(struct file_ra_state *ra,
326326
* - thrashing threshold in memory tight systems
327327
*/
328328
static pgoff_t count_history_pages(struct address_space *mapping,
329-
struct file_ra_state *ra,
330329
pgoff_t offset, unsigned long max)
331330
{
332331
pgoff_t head;
@@ -349,7 +348,7 @@ static int try_context_readahead(struct address_space *mapping,
349348
{
350349
pgoff_t size;
351350

352-
size = count_history_pages(mapping, ra, offset, max);
351+
size = count_history_pages(mapping, offset, max);
353352

354353
/*
355354
* not enough history pages:

0 commit comments

Comments
 (0)