aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerald Schaefer <gerald.schaefer@de.ibm.com>2008-10-18 23:27:11 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-20 11:52:32 -0400
commit1125b4e3949949b44a7c80b619507c6f61d62911 (patch)
tree74d1461ce1bb7eec62ce5f020061c4d7c1a4feba
parent4b2e38ad703541f7845c2d766426148b8d1aa329 (diff)
setup_per_zone_pages_min(): take zone->lock instead of zone->lru_lock
This replaces zone->lru_lock in setup_per_zone_pages_min() with zone->lock. There seems to be no need for the lru_lock anymore, but there is a need for zone->lock instead, because that function may call move_freepages() via setup_zone_migrate_reserve(). Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com> Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Tested-by: Yasunori Goto <y-goto@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--mm/page_alloc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 8f155e9e43db..f2fc44ec1d44 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -4242,7 +4242,7 @@ void setup_per_zone_pages_min(void)
4242 for_each_zone(zone) { 4242 for_each_zone(zone) {
4243 u64 tmp; 4243 u64 tmp;
4244 4244
4245 spin_lock_irqsave(&zone->lru_lock, flags); 4245 spin_lock_irqsave(&zone->lock, flags);
4246 tmp = (u64)pages_min * zone->present_pages; 4246 tmp = (u64)pages_min * zone->present_pages;
4247 do_div(tmp, lowmem_pages); 4247 do_div(tmp, lowmem_pages);
4248 if (is_highmem(zone)) { 4248 if (is_highmem(zone)) {
@@ -4274,7 +4274,7 @@ void setup_per_zone_pages_min(void)
4274 zone->pages_low = zone->pages_min + (tmp >> 2); 4274 zone->pages_low = zone->pages_min + (tmp >> 2);
4275 zone->pages_high = zone->pages_min + (tmp >> 1); 4275 zone->pages_high = zone->pages_min + (tmp >> 1);
4276 setup_zone_migrate_reserve(zone); 4276 setup_zone_migrate_reserve(zone);
4277 spin_unlock_irqrestore(&zone->lru_lock, flags); 4277 spin_unlock_irqrestore(&zone->lock, flags);
4278 } 4278 }
4279 4279
4280 /* update totalreserve_pages */ 4280 /* update totalreserve_pages */