(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 --- mm/readahead.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- mm.orig/mm/readahead.c +++ mm/mm/readahead.c @@ -420,7 +420,7 @@ ondemand_readahead(struct address_space 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) -- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/