diff options
| author | John W. Linville <linville@tuxdriver.com> | 2006-07-27 14:27:06 -0400 |
|---|---|---|
| committer | John W. Linville <linville@tuxdriver.com> | 2006-07-27 14:27:06 -0400 |
| commit | 20f99dcf417a28089ef6c877ae97f5dec2eab435 (patch) | |
| tree | b4fe1f3e429d6a82ddaaa8e12899da630cfa8a63 /mm/vmalloc.c | |
| parent | dd2f5538a157bda68bfa8efb39feaaccdda9e74e (diff) | |
| parent | 64821324ca49f24be1a66f2f432108f96a24e596 (diff) | |
Merge branch 'from-linus' into upstream
Diffstat (limited to 'mm/vmalloc.c')
| -rw-r--r-- | mm/vmalloc.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 7b450798b458..266162d2ba28 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c | |||
| @@ -340,7 +340,7 @@ void __vunmap(void *addr, int deallocate_pages) | |||
| 340 | __free_page(area->pages[i]); | 340 | __free_page(area->pages[i]); |
| 341 | } | 341 | } |
| 342 | 342 | ||
| 343 | if (area->nr_pages > PAGE_SIZE/sizeof(struct page *)) | 343 | if (area->flags & VM_VPAGES) |
| 344 | vfree(area->pages); | 344 | vfree(area->pages); |
| 345 | else | 345 | else |
| 346 | kfree(area->pages); | 346 | kfree(area->pages); |
| @@ -427,9 +427,10 @@ void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask, | |||
| 427 | 427 | ||
| 428 | area->nr_pages = nr_pages; | 428 | area->nr_pages = nr_pages; |
| 429 | /* Please note that the recursion is strictly bounded. */ | 429 | /* Please note that the recursion is strictly bounded. */ |
| 430 | if (array_size > PAGE_SIZE) | 430 | if (array_size > PAGE_SIZE) { |
| 431 | pages = __vmalloc_node(array_size, gfp_mask, PAGE_KERNEL, node); | 431 | pages = __vmalloc_node(array_size, gfp_mask, PAGE_KERNEL, node); |
| 432 | else | 432 | area->flags |= VM_VPAGES; |
| 433 | } else | ||
| 433 | pages = kmalloc_node(array_size, (gfp_mask & ~__GFP_HIGHMEM), node); | 434 | pages = kmalloc_node(array_size, (gfp_mask & ~__GFP_HIGHMEM), node); |
| 434 | area->pages = pages; | 435 | area->pages = pages; |
| 435 | if (!area->pages) { | 436 | if (!area->pages) { |
