summaryrefslogtreecommitdiff
path: root/drivers/pci/controller/dwc/pci-layerscape.c
diff options
context:
space:
mode:
authorChi Zhiling <chizhiling@kylinos.cn>2025-06-05 13:49:35 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-08-28 16:30:58 +0200
commit72e849b5b16a48ac6dc6c09997ce38b90b0f7d86 (patch)
tree632c36f7f4264ba8902de9cd490864842b8ab975 /drivers/pci/controller/dwc/pci-layerscape.c
parent617a8d148d929bc2b54618cdc4fe9b6ac912e500 (diff)
readahead: fix return value of page_cache_next_miss() when no hole is found
commit bbcaee20e03ecaeeecba32a703816a0d4502b6c4 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/pci/controller/dwc/pci-layerscape.c')
0 files changed, 0 insertions, 0 deletions