aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mm/vmalloc.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index 7e00b280648a..75f49d312e8c 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -14,7 +14,6 @@
14#include <linux/highmem.h> 14#include <linux/highmem.h>
15#include <linux/slab.h> 15#include <linux/slab.h>
16#include <linux/spinlock.h> 16#include <linux/spinlock.h>
17#include <linux/mutex.h>
18#include <linux/interrupt.h> 17#include <linux/interrupt.h>
19#include <linux/proc_fs.h> 18#include <linux/proc_fs.h>
20#include <linux/seq_file.h> 19#include <linux/seq_file.h>
@@ -496,7 +495,7 @@ static atomic_t vmap_lazy_nr = ATOMIC_INIT(0);
496static void __purge_vmap_area_lazy(unsigned long *start, unsigned long *end, 495static void __purge_vmap_area_lazy(unsigned long *start, unsigned long *end,
497 int sync, int force_flush) 496 int sync, int force_flush)
498{ 497{
499 static DEFINE_MUTEX(purge_lock); 498 static DEFINE_SPINLOCK(purge_lock);
500 LIST_HEAD(valist); 499 LIST_HEAD(valist);
501 struct vmap_area *va; 500 struct vmap_area *va;
502 int nr = 0; 501 int nr = 0;
@@ -507,10 +506,10 @@ static void __purge_vmap_area_lazy(unsigned long *start, unsigned long *end,
507 * the case that isn't actually used at the moment anyway. 506 * the case that isn't actually used at the moment anyway.
508 */ 507 */
509 if (!sync && !force_flush) { 508 if (!sync && !force_flush) {
510 if (!mutex_trylock(&purge_lock)) 509 if (!spin_trylock(&purge_lock))
511 return; 510 return;
512 } else 511 } else
513 mutex_lock(&purge_lock); 512 spin_lock(&purge_lock);
514 513
515 rcu_read_lock(); 514 rcu_read_lock();
516 list_for_each_entry_rcu(va, &vmap_area_list, list) { 515 list_for_each_entry_rcu(va, &vmap_area_list, list) {
@@ -542,7 +541,7 @@ static void __purge_vmap_area_lazy(unsigned long *start, unsigned long *end,
542 __free_vmap_area(va); 541 __free_vmap_area(va);
543 spin_unlock(&vmap_area_lock); 542 spin_unlock(&vmap_area_lock);
544 } 543 }
545 mutex_unlock(&purge_lock); 544 spin_unlock(&purge_lock);
546} 545}
547 546
548/* 547/*