aboutsummaryrefslogtreecommitdiffstats
path: root/mm/oom_kill.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/oom_kill.c')
-rw-r--r--mm/oom_kill.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index 183a964ca61b..a64decb5b13f 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -28,7 +28,7 @@
28 28
29int sysctl_panic_on_oom; 29int sysctl_panic_on_oom;
30int sysctl_oom_kill_allocating_task; 30int sysctl_oom_kill_allocating_task;
31static DEFINE_MUTEX(zone_scan_mutex); 31static DEFINE_SPINLOCK(zone_scan_mutex);
32/* #define DEBUG */ 32/* #define DEBUG */
33 33
34/** 34/**
@@ -396,7 +396,7 @@ int try_set_zone_oom(struct zonelist *zonelist)
396 396
397 z = zonelist->zones; 397 z = zonelist->zones;
398 398
399 mutex_lock(&zone_scan_mutex); 399 spin_lock(&zone_scan_mutex);
400 do { 400 do {
401 if (zone_is_oom_locked(*z)) { 401 if (zone_is_oom_locked(*z)) {
402 ret = 0; 402 ret = 0;
@@ -413,7 +413,7 @@ int try_set_zone_oom(struct zonelist *zonelist)
413 zone_set_flag(*z, ZONE_OOM_LOCKED); 413 zone_set_flag(*z, ZONE_OOM_LOCKED);
414 } while (*(++z) != NULL); 414 } while (*(++z) != NULL);
415out: 415out:
416 mutex_unlock(&zone_scan_mutex); 416 spin_unlock(&zone_scan_mutex);
417 return ret; 417 return ret;
418} 418}
419 419
@@ -428,11 +428,11 @@ void clear_zonelist_oom(struct zonelist *zonelist)
428 428
429 z = zonelist->zones; 429 z = zonelist->zones;
430 430
431 mutex_lock(&zone_scan_mutex); 431 spin_lock(&zone_scan_mutex);
432 do { 432 do {
433 zone_clear_flag(*z, ZONE_OOM_LOCKED); 433 zone_clear_flag(*z, ZONE_OOM_LOCKED);
434 } while (*(++z) != NULL); 434 } while (*(++z) != NULL);
435 mutex_unlock(&zone_scan_mutex); 435 spin_unlock(&zone_scan_mutex);
436} 436}
437 437
438/** 438/**