Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 250905
b: refs/heads/master
c: 22943ab
h: refs/heads/master
i:
  250903: bab40a4
v: v3
  • Loading branch information
Dave Hansen authored and Linus Torvalds committed May 25, 2011
1 parent 59e5b10 commit 7572ea2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 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: a238ab5b0239575c179f4976064192c3f7409dad
refs/heads/master: 22943ab116af1ead4dc112ec408a93cf1365b34a
9 changes: 7 additions & 2 deletions trunk/mm/vmalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1534,6 +1534,7 @@ static void *__vmalloc_node(unsigned long size, unsigned long align,
static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask,
pgprot_t prot, int node, void *caller)
{
const int order = 0;
struct page **pages;
unsigned int nr_pages, array_size, i;
gfp_t nested_gfp = (gfp_mask & GFP_RECLAIM_MASK) | __GFP_ZERO;
Expand All @@ -1560,11 +1561,12 @@ static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask,

for (i = 0; i < area->nr_pages; i++) {
struct page *page;
gfp_t tmp_mask = gfp_mask | __GFP_NOWARN;

if (node < 0)
page = alloc_page(gfp_mask);
page = alloc_page(tmp_mask);
else
page = alloc_pages_node(node, gfp_mask, 0);
page = alloc_pages_node(node, tmp_mask, order);

if (unlikely(!page)) {
/* Successfully allocated i pages, free them in __vunmap() */
Expand All @@ -1579,6 +1581,9 @@ static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask,
return area->addr;

fail:
warn_alloc_failed(gfp_mask, order, "vmalloc: allocation failure, "
"allocated %ld of %ld bytes\n",
(area->nr_pages*PAGE_SIZE), area->size);
vfree(area->addr);
return NULL;
}
Expand Down

0 comments on commit 7572ea2

Please sign in to comment.