lkml.org 
[lkml]   [2008]   [Feb]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [2.6 patch] mm/slub.c: remove unneeded NULL check
Adrian Bunk wrote:
> There's no reason for checking c->freelist for being NULL here (and we'd
> anyway Oops below if it was).
>
> Signed-off-by: Adrian Bunk <bunk@kernel.org>
>
> ---
> dae2a3c60f258f3ad2522b85d79b735a89d702f0 diff --git a/mm/slub.c b/mm/slub.c
> index 74c65af..072e0a6 100644
> --- a/mm/slub.c
> +++ b/mm/slub.c
> @@ -1404,8 +1404,7 @@ static void deactivate_slab(struct kmem_cache *s, struct kmem_cache_cpu *c)
> struct page *page = c->page;
> int tail = 1;
>
> - if (c->freelist)
> - stat(c, DEACTIVATE_REMOTE_FREES);
> + stat(c, DEACTIVATE_REMOTE_FREES);
> /*
> * Merge cpu freelist into freelist. Typically we get here
> * because both freelists are empty. So this is unlikely

Christoph, please apply.

Reviewed-by: Pekka Enberg <penberg@cs.helsinki.fi>


\
 
 \ /
  Last update: 2008-02-22 21:15    [W:0.055 / U:0.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site