Commit 94721b16 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] Fix logic in filemap_nopage()

The filempa_nopage() logic will go into a tight loop if
do_page_cache_readahead() doesn't actually start I/O against the target page.
This can happen if the disk is read-congested, or if the filesystem doesn't
want to read that part of the file for some reason.

We will accidentally break out of the loop because

	 (ra->mmap_miss > ra->mmap_hit + MMAP_LOTSAMISS)

will eventually become true.

Fix that up.
parent 80b1573f
......@@ -1094,7 +1094,9 @@ struct page * filemap_nopage(struct vm_area_struct * area, unsigned long address
pgoff = 0;
do_page_cache_readahead(mapping, file, pgoff, ra_pages);
}
goto retry_find;
page = find_get_page(mapping, pgoff);
if (!page)
goto no_cached_page;
}
if (!did_readaround)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment