From 84a01c2f8ea9bf210b961c6301e8e870a46505a6 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Sun, 15 Jul 2007 23:38:24 -0700 Subject: slob: sparsemem support Currently slob is disabled if we're using sparsemem, due to an earlier patch from Goto-san. Slob and static sparsemem work without any trouble as it is, and the only hiccup is a missing slab_is_available() in the case of sparsemem extreme. With this, we're rid of the last set of restrictions for slob usage. Signed-off-by: Paul Mundt Acked-by: Pekka Enberg Acked-by: Matt Mackall Cc: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- mm/slob.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'mm') 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; } -- cgit v1.2.3