diff options
author | Jeff Moyer <jmoyer@redhat.com> | 2005-04-17 00:24:05 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-17 00:24:05 +0200 |
commit | d345734267dbec642f4e34a9d392d2fd85b5fa9b (patch) | |
tree | 9a74f4b8292a696620f95933171ac5ddff970ef9 /mm/oom_kill.c | |
parent | [PATCH] r128_state.c: break missing in switch statement (diff) | |
download | linux-d345734267dbec642f4e34a9d392d2fd85b5fa9b.tar.xz linux-d345734267dbec642f4e34a9d392d2fd85b5fa9b.zip |
[PATCH] filemap_getpage can block when MAP_NONBLOCK specified
We will return NULL from filemap_getpage when a page does not exist in the
page cache and MAP_NONBLOCK is specified, here:
page = find_get_page(mapping, pgoff);
if (!page) {
if (nonblock)
return NULL;
goto no_cached_page;
}
But we forget to do so when the page in the cache is not uptodate. The
following could result in a blocking call:
/*
* Ok, found a page in the page cache, now we need to check
* that it's up-to-date.
*/
if (!PageUptodate(page))
goto page_not_uptodate;
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm/oom_kill.c')
0 files changed, 0 insertions, 0 deletions