summaryrefslogtreecommitdiff
path: root/mm/readahead.c
diff options
context:
space:
mode:
authorWu Fengguang <fengguang.wu@intel.com>2009-06-16 15:31:20 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-16 19:47:28 -0700
commitf7e839dd36fd940b0202cfb7d39b2a1b2dc59b1b (patch)
tree5c99332a62aa8135bd58485e7f3c22634ecdc90c /mm/readahead.c
parent1ebf26a9b338534def47f307c6c8694b6dfc0a79 (diff)
downloadlinux-3.10-f7e839dd36fd940b0202cfb7d39b2a1b2dc59b1b.tar.gz
linux-3.10-f7e839dd36fd940b0202cfb7d39b2a1b2dc59b1b.tar.bz2
linux-3.10-f7e839dd36fd940b0202cfb7d39b2a1b2dc59b1b.zip
readahead: move max_sane_readahead() calls into force_page_cache_readahead()
Impact: code simplification. 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.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/mm/readahead.c b/mm/readahead.c
index 133b6d52551..a224182a3a6 100644
--- a/mm/readahead.c
+++ b/mm/readahead.c
@@ -210,6 +210,7 @@ int force_page_cache_readahead(struct address_space *mapping, struct file *filp,
if (unlikely(!mapping->a_ops->readpage && !mapping->a_ops->readpages))
return -EINVAL;
+ nr_to_read = max_sane_readahead(nr_to_read);
while (nr_to_read) {
int err;