Fix: find_or_create_page skips cpuset memory spreading.

We call alloc_page where we should be calling __page_cache_alloc.

__page_cache_alloc performs cpuset memory spreading.  alloc_page does not.
There is no reason that pages allocated via find_or_create should be
exempt.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Christoph Lameter 2007-05-15 23:57:09 -07:00 committed by Linus Torvalds
parent 8382d2b9a7
commit 43c0f3d25c
1 changed files with 2 additions and 1 deletions

View File

@ -670,7 +670,8 @@ repeat:
page = find_lock_page(mapping, index);
if (!page) {
if (!cached_page) {
cached_page = alloc_page(gfp_mask);
cached_page =
__page_cache_alloc(gfp_mask);
if (!cached_page)
return NULL;
}