diff options
author | Wu Fengguang <fengguang.wu@intel.com> | 2009-06-17 00:31:21 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-17 04:47:28 +0200 |
commit | fc31d16add13773265cc53d59f2e7594cb3c0a14 (patch) | |
tree | fe67988da0a8b7bd08cdf3da95c852373638e06b /mm/readahead.c | |
parent | readahead: move max_sane_readahead() calls into force_page_cache_readahead() (diff) | |
download | linux-fc31d16add13773265cc53d59f2e7594cb3c0a14.tar.xz 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; |