diff options
author | Wu Fengguang <fengguang.wu@intel.com> | 2009-06-16 15:31:21 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-16 19:47:28 -0700 |
commit | fc31d16add13773265cc53d59f2e7594cb3c0a14 (patch) | |
tree | fe67988da0a8b7bd08cdf3da95c852373638e06b /mm/readahead.c | |
parent | f7e839dd36fd940b0202cfb7d39b2a1b2dc59b1b (diff) | |
download | blackbird-op-linux-fc31d16add13773265cc53d59f2e7594cb3c0a14.tar.gz blackbird-op-linux-fc31d16add13773265cc53d59f2e7594cb3c0a14.zip |
readahead: apply max_sane_readahead() limit in ondemand_readahead()
Just in case someone aggressively sets a huge readahead size.
Cc: Nick Piggin <npiggin@suse.de>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Cc: Ying Han <yinghan@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/readahead.c')
-rw-r--r-- | mm/readahead.c | 2 |
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; |