Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 176253
b: refs/heads/master
c: 976d6df
h: refs/heads/master
i:
  176251: 06237d0
v: v3
  • Loading branch information
Jan Beulich authored and Linus Torvalds committed Dec 15, 2009
1 parent 9bef94c commit e442be2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bad44b5be84cf3bb1ff900bec02ee61e1993328c
refs/heads/master: 976d6dfbb0175d136fc098854bbce0c028a3924b
7 changes: 3 additions & 4 deletions trunk/mm/vmalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1411,20 +1411,19 @@ static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask,
{
struct page **pages;
unsigned int nr_pages, array_size, i;
gfp_t nested_gfp = (gfp_mask & GFP_RECLAIM_MASK) | __GFP_ZERO;

nr_pages = (area->size - PAGE_SIZE) >> PAGE_SHIFT;
array_size = (nr_pages * sizeof(struct page *));

area->nr_pages = nr_pages;
/* Please note that the recursion is strictly bounded. */
if (array_size > PAGE_SIZE) {
pages = __vmalloc_node(array_size, 1, gfp_mask | __GFP_ZERO,
pages = __vmalloc_node(array_size, 1, nested_gfp|__GFP_HIGHMEM,
PAGE_KERNEL, node, caller);
area->flags |= VM_VPAGES;
} else {
pages = kmalloc_node(array_size,
(gfp_mask & GFP_RECLAIM_MASK) | __GFP_ZERO,
node);
pages = kmalloc_node(array_size, nested_gfp, node);
}
area->pages = pages;
area->caller = caller;
Expand Down

0 comments on commit e442be2

Please sign in to comment.