summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/linux/memory.h6
-rw-r--r--mm/slub.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/include/linux/memory.h b/include/linux/memory.h
index f80e0e331cb7..39628dfe4a4c 100644
--- a/include/linux/memory.h
+++ b/include/linux/memory.h
@@ -53,6 +53,12 @@ struct memory_notify {
struct notifier_block;
struct mem_section;
+/*
+ * Priorities for the hotplug memory callback routines (stored in decreasing
+ * order in the callback chain)
+ */
+#define SLAB_CALLBACK_PRI 1
+
#ifndef CONFIG_MEMORY_HOTPLUG_SPARSE
static inline int memory_dev_init(void)
{
diff --git a/mm/slub.c b/mm/slub.c
index 992ecd4f0d39..b145e798bf3d 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2978,7 +2978,7 @@ void __init kmem_cache_init(void)
kmalloc_caches[0].refcount = -1;
caches++;
- hotplug_memory_notifier(slab_memory_callback, 1);
+ hotplug_memory_notifier(slab_memory_callback, SLAB_CALLBACK_PRI);
#endif
/* Able to allocate the per node structures */