From: Wu Fengguang Date: Tue, 16 Jun 2009 22:31:21 +0000 (-0700) Subject: readahead: remove one unnecessary radix tree lookup X-Git-Tag: MMI-PSA29.97-13-9~27882^2~174 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=caca7cb748571a5b39943a9b3e7081feef055e5e;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 Signed-off-by: Wu Fengguang Cc: Ying Han Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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)