Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bcb4ddb46a4c66d64d091e7ffa951b2aa1ba537f
Commit:     bcb4ddb46a4c66d64d091e7ffa951b2aa1ba537f
Parent:     131612dfe7923bd0ce5f82d6ed8303a7ef96e574
Author:     Dimitri Gorokhovik <[EMAIL PROTECTED]>
AuthorDate: Fri Dec 29 16:48:28 2006 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Sat Dec 30 10:56:42 2006 -0800

    [PATCH] MM: SLOB is broken by recent cleanup of slab.h
    
    Recent cleanup of slab.h broke SLOB allocator: the routine kmem_cache_init
    has now the __init attribute for both slab.c and slob.c.  This routine
    cannot be removed after init in the case of slob.c -- it serves as a timer
    callback.
    
    Provide a separate timer callback routine, call it once from 
kmem_cache_init,
    keep the __init attribute on the latter.
    
    Signed-off-by: Dimitri Gorokhovik <[EMAIL PROTECTED]>
    Cc: Christoph Lameter <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 mm/slob.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/mm/slob.c b/mm/slob.c
index 2e9236e..5adc29c 100644
--- a/mm/slob.c
+++ b/mm/slob.c
@@ -60,6 +60,8 @@ static DEFINE_SPINLOCK(slob_lock);
 static DEFINE_SPINLOCK(block_lock);
 
 static void slob_free(void *b, int size);
+static void slob_timer_cbk(void);
+
 
 static void *slob_alloc(size_t size, gfp_t gfp, int align)
 {
@@ -326,7 +328,7 @@ const char *kmem_cache_name(struct kmem_cache *c)
 EXPORT_SYMBOL(kmem_cache_name);
 
 static struct timer_list slob_timer = TIMER_INITIALIZER(
-       (void (*)(unsigned long))kmem_cache_init, 0, 0);
+       (void (*)(unsigned long))slob_timer_cbk, 0, 0);
 
 int kmem_cache_shrink(struct kmem_cache *d)
 {
@@ -339,7 +341,12 @@ int kmem_ptr_validate(struct kmem_cache *a, const void *b)
        return 0;
 }
 
-void kmem_cache_init(void)
+void __init kmem_cache_init(void)
+{
+       slob_timer_cbk();
+}
+
+static void slob_timer_cbk(void)
 {
        void *p = slob_alloc(PAGE_SIZE, 0, PAGE_SIZE-1);
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to