diff options
Diffstat (limited to 'mm/filemap.c')
-rw-r--r-- | mm/filemap.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index d6f4f073836e..88d719665a28 100644 --- a/mm/filemap.c +++ b/mm/filemap.c | |||
@@ -461,9 +461,15 @@ EXPORT_SYMBOL_GPL(add_to_page_cache_lru); | |||
461 | #ifdef CONFIG_NUMA | 461 | #ifdef CONFIG_NUMA |
462 | struct page *__page_cache_alloc(gfp_t gfp) | 462 | struct page *__page_cache_alloc(gfp_t gfp) |
463 | { | 463 | { |
464 | int n; | ||
465 | struct page *page; | ||
466 | |||
464 | if (cpuset_do_page_mem_spread()) { | 467 | if (cpuset_do_page_mem_spread()) { |
465 | int n = cpuset_mem_spread_node(); | 468 | get_mems_allowed(); |
466 | return alloc_pages_exact_node(n, gfp, 0); | 469 | n = cpuset_mem_spread_node(); |
470 | page = alloc_pages_exact_node(n, gfp, 0); | ||
471 | put_mems_allowed(); | ||
472 | return page; | ||
467 | } | 473 | } |
468 | return alloc_pages(gfp, 0); | 474 | return alloc_pages(gfp, 0); |
469 | } | 475 | } |