aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mm/oom_kill.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index c592965dab2f..e5f50cfdca4d 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -31,7 +31,7 @@
31int sysctl_panic_on_oom; 31int sysctl_panic_on_oom;
32int sysctl_oom_kill_allocating_task; 32int sysctl_oom_kill_allocating_task;
33int sysctl_oom_dump_tasks; 33int sysctl_oom_dump_tasks;
34static DEFINE_SPINLOCK(zone_scan_mutex); 34static DEFINE_SPINLOCK(zone_scan_lock);
35/* #define DEBUG */ 35/* #define DEBUG */
36 36
37/** 37/**
@@ -470,7 +470,7 @@ int try_set_zone_oom(struct zonelist *zonelist, gfp_t gfp_mask)
470 struct zone *zone; 470 struct zone *zone;
471 int ret = 1; 471 int ret = 1;
472 472
473 spin_lock(&zone_scan_mutex); 473 spin_lock(&zone_scan_lock);
474 for_each_zone_zonelist(zone, z, zonelist, gfp_zone(gfp_mask)) { 474 for_each_zone_zonelist(zone, z, zonelist, gfp_zone(gfp_mask)) {
475 if (zone_is_oom_locked(zone)) { 475 if (zone_is_oom_locked(zone)) {
476 ret = 0; 476 ret = 0;
@@ -480,7 +480,7 @@ int try_set_zone_oom(struct zonelist *zonelist, gfp_t gfp_mask)
480 480
481 for_each_zone_zonelist(zone, z, zonelist, gfp_zone(gfp_mask)) { 481 for_each_zone_zonelist(zone, z, zonelist, gfp_zone(gfp_mask)) {
482 /* 482 /*
483 * Lock each zone in the zonelist under zone_scan_mutex so a 483 * Lock each zone in the zonelist under zone_scan_lock so a
484 * parallel invocation of try_set_zone_oom() doesn't succeed 484 * parallel invocation of try_set_zone_oom() doesn't succeed
485 * when it shouldn't. 485 * when it shouldn't.
486 */ 486 */
@@ -488,7 +488,7 @@ int try_set_zone_oom(struct zonelist *zonelist, gfp_t gfp_mask)
488 } 488 }
489 489
490out: 490out:
491 spin_unlock(&zone_scan_mutex); 491 spin_unlock(&zone_scan_lock);
492 return ret; 492 return ret;
493} 493}
494 494
@@ -502,11 +502,11 @@ void clear_zonelist_oom(struct zonelist *zonelist, gfp_t gfp_mask)
502 struct zoneref *z; 502 struct zoneref *z;
503 struct zone *zone; 503 struct zone *zone;
504 504
505 spin_lock(&zone_scan_mutex); 505 spin_lock(&zone_scan_lock);
506 for_each_zone_zonelist(zone, z, zonelist, gfp_zone(gfp_mask)) { 506 for_each_zone_zonelist(zone, z, zonelist, gfp_zone(gfp_mask)) {
507 zone_clear_flag(zone, ZONE_OOM_LOCKED); 507 zone_clear_flag(zone, ZONE_OOM_LOCKED);
508 } 508 }
509 spin_unlock(&zone_scan_mutex); 509 spin_unlock(&zone_scan_lock);
510} 510}
511 511
512/* 512/*