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 | caca7cb748571a5b39943a9b3e7081feef055e5e (patch) | |
tree | 8f115031584d8ebc14280079fed8183ef1f032ac /mm/readahead.c | |
parent | readahead: apply max_sane_readahead() limit in ondemand_readahead() (diff) | |
download | linux-caca7cb748571a5b39943a9b3e7081feef055e5e.tar.xz linux-caca7cb748571a5b39943a9b3e7081feef055e5e.zip |
readahead: remove one unnecessary radix tree lookup
(hit_readahead_marker != 0) means the page at @offset is present, so we
can search for non-present page starting from @offset+1.
Reported-by: Xu Chenfeng <xcf@ustc.edu.cn>
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 bd0f0e88b0a1..56731158309b 100644 --- a/mm/readahead.c +++ b/mm/readahead.c @@ -395,7 +395,7 @@ ondemand_readahead(struct address_space *mapping, pgoff_t start; rcu_read_lock(); - start = radix_tree_next_hole(&mapping->page_tree, offset,max+1); + start = radix_tree_next_hole(&mapping->page_tree, offset+1,max); rcu_read_unlock(); if (!start || start - offset > max) |