It is possible (and occurs!) that not uptodate pages are mapped into
process space.
Maybe, this fix is not complete.
BTW, someone complained about NFS mmap oddities. Maybe, this fix will
repair them too.
/*
* Find a cached page and wait for it to become up-to-date, return
^ comment is ok. But code does
not it!
* the page address. Increments the page count.
*/
static inline unsigned long fill_page(struct inode * inode, unsigned long offset)
{
...........
add_to_page_cache(page, inode, offset);
inode->i_op->readpage(inode, page);
#ifdef NO_ANK_FIX
if (PageLocked(page))
new_page = try_to_read_ahead(inode, offset + PAGE_SIZE, 0);
#else
if (PageUptodate(page) || PageLocked(page))
new_page = try_to_read_ahead(inode, offset + PAGE_SIZE, 0);
#endif
found_page:
if (new_page)
free_page(new_page);
found_page_dont_free:
wait_on_page(page);
#ifndef NO_ANK_FIX
if (!PageUptodate(page)) {
inode->i_op->readpage(inode, page);
wait_on_page(page);
if (!PageUptodate(page)) {
if (PageError(page))
return 0;
goto found_page_dont_free;
}
}
#endif
return page_address(page);
}
Alexey Kuznetsov.