mm: fix find_get_pages_contig From: Konstantin Khlebnikov Signed-off-by: Konstantin Khlebnikov --- mm/filemap.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mm/filemap.c b/mm/filemap.c index 79c4b2b..f4343a3 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -928,7 +928,10 @@ repeat: * otherwise we can get both false positives and false * negatives, which is just confusing to the caller. */ - if (page->mapping == NULL || page->index != iter.index) { + if (page->mapping == NULL || page->index != index + ret) { + if (iter.index != index + ret) + printk("%s %lu %lu %u\n", __func__, + iter.index, index, ret); page_cache_release(page); break; }