Re: slab.c in test3-pre7

From: Manfred (manfred@colorfullife.com)
Date: Sun Jul 09 2000 - 09:33:24 EST


On Sun, 9 Jul 2000, Andrew Morton wrote:

>
> This initialisation is already done in kmem_cache_init(), so it's not
> needed.
>
The initialization in kmem_cache_init() is also wrong:
cache_chain is equal to cache_cache.next.

Andrew, could you try the attached patch? It's tested with gcc-2.95.

--
	Manfred

<<<<<<<<<<< --- 2.4/mm/slab.c Sun Jul 9 10:24:24 2000 +++ build-2.4/mm/slab.c Sun Jul 9 16:18:41 2000 @@ -355,7 +355,6 @@ spinlock: SPIN_LOCK_UNLOCKED, colour_off: L1_CACHE_BYTES, name: "kmem_cache", - next: LIST_HEAD_INIT(cache_cache.next) }; /* Guard access to the cache-chain. */ @@ -412,7 +411,7 @@ size_t left_over; init_MUTEX(&cache_chain_sem); - list_add(&cache_cache.next,&cache_chain); + INIT_LIST_HEAD(&cache_chain); kmem_cache_estimate(0, cache_cache.objsize, 0, &left_over, &cache_cache.num); >>>>>>>>>>>

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Jul 15 2000 - 21:00:10 EST