diff options
| author | Chi Zhiling <[email protected]> | 2025-06-05 05:49:35 +0000 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2025-07-10 05:41:59 +0000 |
| commit | bbcaee20e03ecaeeecba32a703816a0d4502b6c4 (patch) | |
| tree | 2502cf4dc620c623eaa7962fa7d2e247304129e8 /drivers/base/node.c | |
| parent | mm/cma: pair the trace_cma_alloc_start/finish (diff) | |
| download | kernel-bbcaee20e03ecaeeecba32a703816a0d4502b6c4.tar.gz kernel-bbcaee20e03ecaeeecba32a703816a0d4502b6c4.zip | |
readahead: fix return value of page_cache_next_miss() when no hole is found
max_scan in page_cache_next_miss always decreases to zero when no hole is
found, causing the return value to be index + 0.
Fix this by preserving the max_scan value throughout the loop.
Jan said "From what I know and have seen in the past, wrong responses
from page_cache_next_miss() can lead to readahead window reduction and
thus reduced read speeds."
Link: https://lkml.kernel.org/r/[email protected]
Fixes: 901a269ff3d5 ("filemap: fix page_cache_next_miss() when no hole found")
Signed-off-by: Chi Zhiling <[email protected]>
Reviewed-by: Jan Kara <[email protected]>
Cc: Josef Bacik <[email protected]>
Cc: Matthew Wilcox (Oracle) <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'drivers/base/node.c')
0 files changed, 0 insertions, 0 deletions
