From: Pekka Enberg <penberg@cs.helsinki.fi>
To: Adrian Bunk <bunk@kernel.org>
Cc: clameter@sgi.com, mpm@selenic.com,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [2.6 patch] mm/slub.c: remove unneeded NULL check
Date: Fri, 22 Feb 2008 22:11:31 +0200 [thread overview]
Message-ID: <47BF2C73.4030308@cs.helsinki.fi> (raw)
In-Reply-To: <20080222195905.GM1409@cs181133002.pp.htv.fi>
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>
WARNING: multiple messages have this Message-ID (diff)
From: Pekka Enberg <penberg@cs.helsinki.fi>
To: Adrian Bunk <bunk@kernel.org>
Cc: clameter@sgi.com, mpm@selenic.com,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [2.6 patch] mm/slub.c: remove unneeded NULL check
Date: Fri, 22 Feb 2008 22:11:31 +0200 [thread overview]
Message-ID: <47BF2C73.4030308@cs.helsinki.fi> (raw)
In-Reply-To: <20080222195905.GM1409@cs181133002.pp.htv.fi>
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>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2008-02-22 20:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-19 22:49 mm/slub.c: inconsequent NULL checking Adrian Bunk
2008-02-19 22:49 ` Adrian Bunk
2008-02-20 13:52 ` Pekka Enberg
2008-02-20 13:52 ` Pekka Enberg
2008-02-22 19:59 ` [2.6 patch] mm/slub.c: remove unneeded NULL check Adrian Bunk
2008-02-22 19:59 ` Adrian Bunk
2008-02-22 20:11 ` Pekka Enberg [this message]
2008-02-22 20:11 ` Pekka Enberg
2008-02-27 19:55 ` Christoph Lameter
2008-02-27 19:55 ` Christoph Lameter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47BF2C73.4030308@cs.helsinki.fi \
--to=penberg@cs.helsinki.fi \
--cc=bunk@kernel.org \
--cc=clameter@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mpm@selenic.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.