summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mm/readahead.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/readahead.c b/mm/readahead.c
index a224182a3a63..bd0f0e88b0a1 100644
--- a/mm/readahead.c
+++ b/mm/readahead.c
@@ -357,7 +357,7 @@ ondemand_readahead(struct address_space *mapping,
bool hit_readahead_marker, pgoff_t offset,
unsigned long req_size)
{
- int max = ra->ra_pages; /* max readahead pages */
+ unsigned long max = max_sane_readahead(ra->ra_pages);
pgoff_t prev_offset;
int sequential;