diff options
Diffstat (limited to 'mm/vmalloc.c')
-rw-r--r-- | mm/vmalloc.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 6b8889da69a6..9f909622a25e 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c | |||
@@ -517,6 +517,15 @@ static atomic_t vmap_lazy_nr = ATOMIC_INIT(0); | |||
517 | static void purge_fragmented_blocks_allcpus(void); | 517 | static void purge_fragmented_blocks_allcpus(void); |
518 | 518 | ||
519 | /* | 519 | /* |
520 | * called before a call to iounmap() if the caller wants vm_area_struct's | ||
521 | * immediately freed. | ||
522 | */ | ||
523 | void set_iounmap_nonlazy(void) | ||
524 | { | ||
525 | atomic_set(&vmap_lazy_nr, lazy_max_pages()+1); | ||
526 | } | ||
527 | |||
528 | /* | ||
520 | * Purges all lazily-freed vmap areas. | 529 | * Purges all lazily-freed vmap areas. |
521 | * | 530 | * |
522 | * If sync is 0 then don't purge if there is already a purge in progress. | 531 | * If sync is 0 then don't purge if there is already a purge in progress. |
@@ -2056,6 +2065,7 @@ void free_vm_area(struct vm_struct *area) | |||
2056 | } | 2065 | } |
2057 | EXPORT_SYMBOL_GPL(free_vm_area); | 2066 | EXPORT_SYMBOL_GPL(free_vm_area); |
2058 | 2067 | ||
2068 | #ifdef CONFIG_SMP | ||
2059 | static struct vmap_area *node_to_va(struct rb_node *n) | 2069 | static struct vmap_area *node_to_va(struct rb_node *n) |
2060 | { | 2070 | { |
2061 | return n ? rb_entry(n, struct vmap_area, rb_node) : NULL; | 2071 | return n ? rb_entry(n, struct vmap_area, rb_node) : NULL; |
@@ -2336,6 +2346,7 @@ void pcpu_free_vm_areas(struct vm_struct **vms, int nr_vms) | |||
2336 | free_vm_area(vms[i]); | 2346 | free_vm_area(vms[i]); |
2337 | kfree(vms); | 2347 | kfree(vms); |
2338 | } | 2348 | } |
2349 | #endif /* CONFIG_SMP */ | ||
2339 | 2350 | ||
2340 | #ifdef CONFIG_PROC_FS | 2351 | #ifdef CONFIG_PROC_FS |
2341 | static void *s_start(struct seq_file *m, loff_t *pos) | 2352 | static void *s_start(struct seq_file *m, loff_t *pos) |