slab: simplify list initialization The list initialization is simpler if we would do a memset instead of explicitly mentioning each field. This is also going to simplify the next patch that moves the alien cache array into the l3 structure. Signed-off-by: Christoph Lameter Index: linux-2.6.18-rc3/mm/slab.c =================================================================== --- linux-2.6.18-rc3.orig/mm/slab.c 2006-08-03 22:56:18.103218771 -0700 +++ linux-2.6.18-rc3/mm/slab.c 2006-08-03 22:58:30.853796134 -0700 @@ -353,15 +353,11 @@ static int slab_early_init = 1; static void kmem_list3_init(struct kmem_list3 *parent) { + memset(parent, 0, sizeof(struct kmem_list3)); INIT_LIST_HEAD(&parent->slabs_full); INIT_LIST_HEAD(&parent->slabs_partial); INIT_LIST_HEAD(&parent->slabs_free); - parent->shared = NULL; - parent->alien = NULL; - parent->colour_next = 0; spin_lock_init(&parent->list_lock); - parent->free_objects = 0; - parent->free_touched = 0; } #define MAKE_LIST(cachep, listp, slab, nodeid) \