mm/readahead.c: remove unused file_ra_state from count_history_pages
authorFabian Frederick <fabf@skynet.be>
Wed, 6 Aug 2014 23:04:55 +0000 (16:04 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 7 Aug 2014 01:01:15 +0000 (18:01 -0700)
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>
mm/readahead.c

index 0ca36a7770b1b974eaea70d6357b7cdbd73aad3d..17b9172ec37f1ef05d49b45f244ec23f6d934ed1 100644 (file)
@@ -326,7 +326,6 @@ static unsigned long get_next_ra_size(struct file_ra_state *ra,
  *     - thrashing threshold in memory tight systems
  */
 static pgoff_t count_history_pages(struct address_space *mapping,
-                                  struct file_ra_state *ra,
                                   pgoff_t offset, unsigned long max)
 {
        pgoff_t head;
@@ -349,7 +348,7 @@ static int try_context_readahead(struct address_space *mapping,
 {
        pgoff_t size;
 
-       size = count_history_pages(mapping, ra, offset, max);
+       size = count_history_pages(mapping, offset, max);
 
        /*
         * not enough history pages: