Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e51bfd0ad10600a9fe4c8ede5ac2272e80075008 Commit: e51bfd0ad10600a9fe4c8ede5ac2272e80075008 Parent: e760e716d47b48caf98da348368fd41b4a9b9e7e Author: Marcin Slusarz <[EMAIL PROTECTED]> AuthorDate: Sun Feb 10 11:21:54 2008 +0100 Committer: Christoph Lameter <[EMAIL PROTECTED]> CommitDate: Thu Feb 14 15:30:01 2008 -0800
slab: avoid double initialization & do initialization in 1 place - 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 <[EMAIL PROTECTED]> CC: Christoph Lameter <[EMAIL PROTECTED]> Reviewed-by: Pekka Enberg <[EMAIL PROTECTED]> Signed-off-by: Christoph Lameter <[EMAIL PROTECTED]> --- 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); - 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