summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorChi Zhiling <chizhiling@kylinos.cn>2025-06-05 08:49:35 +0300
committerAndrew Morton <akpm@linux-foundation.org>2025-07-10 08:41:59 +0300
commitbbcaee20e03ecaeeecba32a703816a0d4502b6c4 (patch)
tree2502cf4dc620c623eaa7962fa7d2e247304129e8 /drivers
parent08e21e241210a3a124cfafd33db3dbda49b6f43d (diff)
downloadlinux-bbcaee20e03ecaeeecba32a703816a0d4502b6c4.tar.xz
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/20250605054935.2323451-1-chizhiling@163.com Fixes: 901a269ff3d5 ("filemap: fix page_cache_next_miss() when no hole found") Signed-off-by: Chi Zhiling <chizhiling@kylinos.cn> Reviewed-by: Jan Kara <jack@suse.cz> Cc: Josef Bacik <josef@toxicpanda.com> Cc: Matthew Wilcox (Oracle) <willy@infradead.org> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'drivers')
0 files changed, 0 insertions, 0 deletions