aboutsummaryrefslogtreecommitdiffstats
path: root/mm/memory_hotplug.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-01-15 16:01:14 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-15 16:01:14 -0500
commit1b59be2a6cdcb5a12e18d8315c07c94a624de48f (patch)
tree5cf48d9f94d85e9b1f984610b6868ad100ca1916 /mm/memory_hotplug.c
parentf9ee7f60d6f37ae0184812b4c59b3869f875768b (diff)
parent2ed1c5257b5d669df2a64bd53e61dc19c7d936cd (diff)
Merge branch 'slab/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6
* 'slab/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6: Update Pekka's email address in MAINTAINERS mm/slab.c: make local symbols static slub: Avoid use of slub_lock in show_slab_objects() memory hotplug: one more lock on memory hotplug
Diffstat (limited to 'mm/memory_hotplug.c')
-rw-r--r--mm/memory_hotplug.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index e92f04749fcb..321fc7455df7 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -409,6 +409,7 @@ int online_pages(unsigned long pfn, unsigned long nr_pages)
409 int ret; 409 int ret;
410 struct memory_notify arg; 410 struct memory_notify arg;
411 411
412 lock_memory_hotplug();
412 arg.start_pfn = pfn; 413 arg.start_pfn = pfn;
413 arg.nr_pages = nr_pages; 414 arg.nr_pages = nr_pages;
414 arg.status_change_nid = -1; 415 arg.status_change_nid = -1;
@@ -421,6 +422,7 @@ int online_pages(unsigned long pfn, unsigned long nr_pages)
421 ret = notifier_to_errno(ret); 422 ret = notifier_to_errno(ret);
422 if (ret) { 423 if (ret) {
423 memory_notify(MEM_CANCEL_ONLINE, &arg); 424 memory_notify(MEM_CANCEL_ONLINE, &arg);
425 unlock_memory_hotplug();
424 return ret; 426 return ret;
425 } 427 }
426 /* 428 /*
@@ -445,6 +447,7 @@ int online_pages(unsigned long pfn, unsigned long nr_pages)
445 printk(KERN_DEBUG "online_pages %lx at %lx failed\n", 447 printk(KERN_DEBUG "online_pages %lx at %lx failed\n",
446 nr_pages, pfn); 448 nr_pages, pfn);
447 memory_notify(MEM_CANCEL_ONLINE, &arg); 449 memory_notify(MEM_CANCEL_ONLINE, &arg);
450 unlock_memory_hotplug();
448 return ret; 451 return ret;
449 } 452 }
450 453
@@ -469,6 +472,7 @@ int online_pages(unsigned long pfn, unsigned long nr_pages)
469 472
470 if (onlined_pages) 473 if (onlined_pages)
471 memory_notify(MEM_ONLINE, &arg); 474 memory_notify(MEM_ONLINE, &arg);
475 unlock_memory_hotplug();
472 476
473 return 0; 477 return 0;
474} 478}