Thread (28 messages) 28 messages, 2 authors, 2012-10-17
STALE5001d

[PATCH 3/5] Remove file_ra_state from arguments of count_history_pages.

From: <hidden>
Date: 2012-09-22 10:33:47
Subsystem: memory management, page cache, the rest · Maintainers: Andrew Morton, Matthew Wilcox, Linus Torvalds

From: Raghavendra D Prabhu <redacted>

count_history_pages doesn't require readahead state to calculate the offset from history.

Signed-off-by: Raghavendra D Prabhu <redacted>
---
 mm/readahead.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/mm/readahead.c b/mm/readahead.c
index fec726c..3977455 100644
--- a/mm/readahead.c
+++ b/mm/readahead.c
@@ -349,7 +349,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;
@@ -372,7 +371,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);
 
 	/*
 	 * no history pages:
-- 
1.7.12.1

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help