Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 32617
b: refs/heads/master
c: 8757d5f
h: refs/heads/master
i:
  32615: 63a71a1
v: v3
  • Loading branch information
Jan Kiszka authored and Linus Torvalds committed Jul 15, 2006
1 parent 48d94e2 commit ebd6567
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 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: e322fedf0c59938716cdfbafbe364a170919aa1a
refs/heads/master: 8757d5fa6b75e8ea906baf0309d49b980e7f9bc9
1 change: 1 addition & 0 deletions trunk/include/linux/vmalloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ struct vm_area_struct;
#define VM_ALLOC 0x00000002 /* vmalloc() */
#define VM_MAP 0x00000004 /* vmap()ed pages */
#define VM_USERMAP 0x00000008 /* suitable for remap_vmalloc_range */
#define VM_VPAGES 0x00000010 /* buffer for pages was vmalloc'ed */
/* bits [20..32] reserved for arch specific ioremap internals */

/*
Expand Down
7 changes: 4 additions & 3 deletions trunk/mm/vmalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ void __vunmap(void *addr, int deallocate_pages)
__free_page(area->pages[i]);
}

if (area->nr_pages > PAGE_SIZE/sizeof(struct page *))
if (area->flags & VM_VPAGES)
vfree(area->pages);
else
kfree(area->pages);
Expand Down Expand Up @@ -427,9 +427,10 @@ void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask,

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

0 comments on commit ebd6567

Please sign in to comment.