diff mbox series

[06/10] readahead: Drop dead code in page_cache_ra_order()

Message ID 20240625101909.12234-6-jack@suse.cz (mailing list archive)
State New
Headers show
Series mm: Fix various readahead quirks | expand

Commit Message

Jan Kara June 25, 2024, 10:18 a.m. UTC
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@suse.cz>
---
 mm/readahead.c | 5 -----
 1 file changed, 5 deletions(-)
diff mbox series

Patch

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);