summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorPekka Enberg <penberg@kernel.org>2011-01-15 14:28:17 +0300
committerPekka Enberg <penberg@kernel.org>2011-01-15 14:28:17 +0300
commit597fb188cbee2d371246e1669bbc6051bb666aa9 (patch)
treefd9cb605050ca15274cf391dc6bd4073d04808df /mm
parent38567333a6dabd0f2b4150e9fb6dd8e3ba2985e5 (diff)
parent04d94879c8a4973b5499dc26b9d38acee8928791 (diff)
downloadlinux-597fb188cbee2d371246e1669bbc6051bb666aa9.tar.xz
Merge branch 'slub/hotplug' into slab/urgent
Diffstat (limited to 'mm')
-rw-r--r--mm/memory_hotplug.c4
-rw-r--r--mm/slub.c4
2 files changed, 6 insertions, 2 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;
}
diff --git a/mm/slub.c b/mm/slub.c
index c7ef0070dd86..e15aa7f193c9 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -3797,7 +3797,7 @@ static ssize_t show_slab_objects(struct kmem_cache *s,
}
}
- down_read(&slub_lock);
+ lock_memory_hotplug();
#ifdef CONFIG_SLUB_DEBUG
if (flags & SO_ALL) {
for_each_node_state(node, N_NORMAL_MEMORY) {
@@ -3838,7 +3838,7 @@ static ssize_t show_slab_objects(struct kmem_cache *s,
x += sprintf(buf + x, " N%d=%lu",
node, nodes[node]);
#endif
- up_read(&slub_lock);
+ unlock_memory_hotplug();
kfree(nodes);
return x + sprintf(buf + x, "\n");
}