page_cache_ra_order() scales folio order down so that is fully fits within readahead window. Thus the code handling the case where we walked past the readahead window is a dead code. Remove it. Signed-off-by: Jan Kara <jack@xxxxxxx> --- mm/readahead.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/mm/readahead.c b/mm/readahead.c index 455edafebb07..9ea5125a0dce 100644 --- a/mm/readahead.c +++ b/mm/readahead.c @@ -525,11 +525,6 @@ void page_cache_ra_order(struct readahead_control *ractl, index += 1UL << order; } - if (index > limit) { - ra->size += index - limit - 1; - ra->async_size += index - limit - 1; - } - read_pages(ractl); filemap_invalidate_unlock_shared(mapping); memalloc_nofs_restore(nofs); -- 2.35.3