The quilt patch titled Subject: filemap: fix page_cache_next_miss() when no hole found has been removed from the -mm tree. Its filename was filemap-fix-page_cache_next_miss-when-no-hole-found.patch This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm ------------------------------------------------------ From: Jan Kara <jack@xxxxxxx> Subject: filemap: fix page_cache_next_miss() when no hole found Date: Tue, 25 Jun 2024 12:18:52 +0200 page_cache_next_miss() should return value outside of the specified range when no hole is found. However currently it will return the last index *in* the specified range confusing ondemand_readahead() to think there's a hole in the searched range and upsetting readahead logic. Link: https://lkml.kernel.org/r/20240625101909.12234-2-jack@xxxxxxx Signed-off-by: Jan Kara <jack@xxxxxxx> Reviewed-by: Josef Bacik <josef@xxxxxxxxxxxxxx> Tested-by: Zhang Peng <zhangpengpeng0808@xxxxxxxxx> Cc: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/filemap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/mm/filemap.c~filemap-fix-page_cache_next_miss-when-no-hole-found +++ a/mm/filemap.c @@ -1752,12 +1752,12 @@ pgoff_t page_cache_next_miss(struct addr while (max_scan--) { void *entry = xas_next(&xas); if (!entry || xa_is_value(entry)) - break; + return xas.xa_index; if (xas.xa_index == 0) - break; + return 0; } - return xas.xa_index; + return index + max_scan; } EXPORT_SYMBOL(page_cache_next_miss); _ Patches currently in -mm which might be from jack@xxxxxxx are