* [PATCH resend] slab: avoid double initialization & do initialization in 1 place
@ 2008-02-10 10:21 Marcin Slusarz
0 siblings, 0 replies; only message in thread
From: Marcin Slusarz @ 2008-02-10 10:21 UTC (permalink / raw)
To: LKML; +Cc: Christoph Lameter, Pekka Enberg
- alloc_slabmgmt: initialize all slab fields in 1 place
- slab->nodeid was initialized twice: in alloc_slabmgmt
and immediately after it in cache_grow
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
CC: Christoph Lameter <clameter@sgi.com>
Reviewed-by: Pekka Enberg <penberg@cs.helsinki.fi>
---
mm/slab.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/mm/slab.c b/mm/slab.c
index 40c00da..473e6c2 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -2630,6 +2630,7 @@ static struct slab *alloc_slabmgmt(struct kmem_cache *cachep, void *objp,
slabp->colouroff = colour_off;
slabp->s_mem = objp + colour_off;
slabp->nodeid = nodeid;
+ slabp->free = 0;
return slabp;
}
@@ -2683,7 +2684,6 @@ static void cache_init_objs(struct kmem_cache *cachep,
slab_bufctl(slabp)[i] = i + 1;
}
slab_bufctl(slabp)[i - 1] = BUFCTL_END;
- slabp->free = 0;
}
static void kmem_flagcheck(struct kmem_cache *cachep, gfp_t flags)
@@ -2816,7 +2816,6 @@ static int cache_grow(struct kmem_cache *cachep,
if (!slabp)
goto opps1;
- slabp->nodeid = nodeid;
slab_map_pages(cachep, slabp, objp);
cache_init_objs(cachep, slabp);
--
1.5.3.7
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2008-02-10 10:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-10 10:21 [PATCH resend] slab: avoid double initialization & do initialization in 1 place Marcin Slusarz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox