aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--init/Kconfig2
-rw-r--r--mm/slob.c8
2 files changed, 9 insertions, 1 deletions
diff --git a/init/Kconfig b/init/Kconfig
index d9d878a3bb4..63d52a089a9 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -576,7 +576,7 @@ config SLUB
and has enhanced diagnostics.
config SLOB
- depends on EMBEDDED && !SPARSEMEM
+ depends on EMBEDDED
bool "SLOB (Simple Allocator)"
help
SLOB replaces the SLAB allocator with a drastically simpler
diff --git a/mm/slob.c b/mm/slob.c
index b99b0ef2347..b4899079d8b 100644
--- a/mm/slob.c
+++ b/mm/slob.c
@@ -634,6 +634,14 @@ int kmem_ptr_validate(struct kmem_cache *a, const void *b)
return 0;
}
+static unsigned int slob_ready __read_mostly;
+
+int slab_is_available(void)
+{
+ return slob_ready;
+}
+
void __init kmem_cache_init(void)
{
+ slob_ready = 1;
}