aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kara <[email protected]>2024-06-25 12:18:56 +0200
committerAndrew Morton <[email protected]>2024-07-03 19:30:27 -0700
commit8eaf93ac70f3e1bbbe7e28a4f34289ef2d0d0bef (patch)
tree41689fb0f64b5691d143fe7cd4fe193545402298
parentbb82ac31ddcedd6a1e6ee30b7afec7acdef811e1 (diff)
readahead: drop dead code in page_cache_ra_order()
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. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Jan Kara <[email protected]> Reviewed-by: Josef Bacik <[email protected]> Tested-by: Zhang Peng <[email protected]> Cc: Matthew Wilcox (Oracle) <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
-rw-r--r--mm/readahead.c5
1 files changed, 0 insertions, 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);