aboutsummaryrefslogtreecommitdiffstats
path: root/mm/memory_hotplug.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/memory_hotplug.c')
-rw-r--r--mm/memory_hotplug.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index 089cc97aed3c..a4cfcdc00455 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -389,11 +389,6 @@ int online_pages(unsigned long pfn, unsigned long nr_pages)
389 int nid; 389 int nid;
390 int ret; 390 int ret;
391 struct memory_notify arg; 391 struct memory_notify arg;
392 /*
393 * mutex to protect zone->pageset when it's still shared
394 * in onlined_pages()
395 */
396 static DEFINE_MUTEX(zone_pageset_mutex);
397 392
398 arg.start_pfn = pfn; 393 arg.start_pfn = pfn;
399 arg.nr_pages = nr_pages; 394 arg.nr_pages = nr_pages;
@@ -420,14 +415,14 @@ int online_pages(unsigned long pfn, unsigned long nr_pages)
420 * This means the page allocator ignores this zone. 415 * This means the page allocator ignores this zone.
421 * So, zonelist must be updated after online. 416 * So, zonelist must be updated after online.
422 */ 417 */
423 mutex_lock(&zone_pageset_mutex); 418 mutex_lock(&zonelists_mutex);
424 if (!populated_zone(zone)) 419 if (!populated_zone(zone))
425 need_zonelists_rebuild = 1; 420 need_zonelists_rebuild = 1;
426 421
427 ret = walk_system_ram_range(pfn, nr_pages, &onlined_pages, 422 ret = walk_system_ram_range(pfn, nr_pages, &onlined_pages,
428 online_pages_range); 423 online_pages_range);
429 if (ret) { 424 if (ret) {
430 mutex_unlock(&zone_pageset_mutex); 425 mutex_unlock(&zonelists_mutex);
431 printk(KERN_DEBUG "online_pages %lx at %lx failed\n", 426 printk(KERN_DEBUG "online_pages %lx at %lx failed\n",
432 nr_pages, pfn); 427 nr_pages, pfn);
433 memory_notify(MEM_CANCEL_ONLINE, &arg); 428 memory_notify(MEM_CANCEL_ONLINE, &arg);
@@ -441,7 +436,7 @@ int online_pages(unsigned long pfn, unsigned long nr_pages)
441 else 436 else
442 zone_pcp_update(zone); 437 zone_pcp_update(zone);
443 438
444 mutex_unlock(&zone_pageset_mutex); 439 mutex_unlock(&zonelists_mutex);
445 setup_per_zone_wmarks(); 440 setup_per_zone_wmarks();
446 calculate_zone_inactive_ratio(zone); 441 calculate_zone_inactive_ratio(zone);
447 if (onlined_pages) { 442 if (onlined_pages) {