Commit caca7cb7 authored by Wu Fengguang's avatar Wu Fengguang Committed by Linus Torvalds

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: default avatarXu Chenfeng <xcf@ustc.edu.cn>
Signed-off-by: default avatarWu Fengguang <fengguang.wu@intel.com>
Cc: Ying Han <yinghan@google.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent fc31d16a
...@@ -395,7 +395,7 @@ ondemand_readahead(struct address_space *mapping, ...@@ -395,7 +395,7 @@ ondemand_readahead(struct address_space *mapping,
pgoff_t start; pgoff_t start;
rcu_read_lock(); 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(); rcu_read_unlock();
if (!start || start - offset > max) if (!start || start - offset > max)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment