summaryrefslogtreecommitdiff
path: root/mm/vmalloc.c
diff options
context:
space:
mode:
authorDavid Rientjes <rientjes@google.com>2016-01-14 15:19:35 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2016-01-14 16:00:49 -0800
commit244d63ee345bd9d45c87f665ef5e3f7bcd5db45b (patch)
treeca50ea6c24ea89e204c72fb81d77605420ff091d /mm/vmalloc.c
parent146693471f1df44115cf4aaf13c33618619ad855 (diff)
downloadlinux-rpi-244d63ee345bd9d45c87f665ef5e3f7bcd5db45b.tar.gz
linux-rpi-244d63ee345bd9d45c87f665ef5e3f7bcd5db45b.tar.bz2
linux-rpi-244d63ee345bd9d45c87f665ef5e3f7bcd5db45b.zip
mm, vmalloc: remove VM_VPAGES
VM_VPAGES is unnecessary, it's easier to check is_vmalloc_addr() when reading /proc/vmallocinfo. [akpm@linux-foundation.org: remove VM_VPAGES reference via kvfree()] Signed-off-by: David Rientjes <rientjes@google.com> Cc: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/vmalloc.c')
-rw-r--r--mm/vmalloc.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index 7007fe85840e..58ceeb107960 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -1479,10 +1479,7 @@ static void __vunmap(const void *addr, int deallocate_pages)
__free_kmem_pages(page, 0);
}
- if (area->flags & VM_VPAGES)
- vfree(area->pages);
- else
- kfree(area->pages);
+ kvfree(area->pages);
}
kfree(area);
@@ -1592,7 +1589,6 @@ static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask,
if (array_size > PAGE_SIZE) {
pages = __vmalloc_node(array_size, 1, nested_gfp|__GFP_HIGHMEM,
PAGE_KERNEL, node, area->caller);
- area->flags |= VM_VPAGES;
} else {
pages = kmalloc_node(array_size, nested_gfp, node);
}
@@ -2650,7 +2646,7 @@ static int s_show(struct seq_file *m, void *p)
if (v->flags & VM_USERMAP)
seq_puts(m, " user");
- if (v->flags & VM_VPAGES)
+ if (is_vmalloc_addr(v->pages))
seq_puts(m, " vpages");
show_numa_info(m, v);