diff options
author | Pekka Enberg <penberg@kernel.org> | 2011-01-15 12:28:17 +0100 |
---|---|---|
committer | Pekka Enberg <penberg@kernel.org> | 2011-01-15 12:28:17 +0100 |
commit | 597fb188cbee2d371246e1669bbc6051bb666aa9 (patch) | |
tree | fd9cb605050ca15274cf391dc6bd4073d04808df /mm/memory_hotplug.c | |
parent | Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-post-merge-2.6 (diff) | |
parent | slub: Avoid use of slub_lock in show_slab_objects() (diff) | |
download | linux-597fb188cbee2d371246e1669bbc6051bb666aa9.tar.xz linux-597fb188cbee2d371246e1669bbc6051bb666aa9.zip |
Merge branch 'slub/hotplug' into slab/urgent
Diffstat (limited to 'mm/memory_hotplug.c')
-rw-r--r-- | mm/memory_hotplug.c | 4 |
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) int ret; struct memory_notify arg; + lock_memory_hotplug(); arg.start_pfn = pfn; arg.nr_pages = nr_pages; arg.status_change_nid = -1; @@ -421,6 +422,7 @@ int online_pages(unsigned long pfn, unsigned long nr_pages) ret = notifier_to_errno(ret); if (ret) { memory_notify(MEM_CANCEL_ONLINE, &arg); + unlock_memory_hotplug(); return ret; } /* @@ -445,6 +447,7 @@ int online_pages(unsigned long pfn, unsigned long nr_pages) printk(KERN_DEBUG "online_pages %lx at %lx failed\n", nr_pages, pfn); memory_notify(MEM_CANCEL_ONLINE, &arg); + unlock_memory_hotplug(); return ret; } @@ -469,6 +472,7 @@ int online_pages(unsigned long pfn, unsigned long nr_pages) if (onlined_pages) memory_notify(MEM_ONLINE, &arg); + unlock_memory_hotplug(); return 0; } |