[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20100313002707.256946625@kvm.kroah.org>
Date: Fri, 12 Mar 2010 16:25:56 -0800
From: Greg KH <gregkh@...e.de>
To: linux-kernel@...r.kernel.org, stable@...nel.org
Cc: stable-review@...nel.org, torvalds@...ux-foundation.org,
akpm@...ux-foundation.org, alan@...rguk.ukuu.org.uk,
Eric Dumazet <eric.dumazet@...il.com>,
Andi Kleen <ak@...ux.intel.com>,
Christoph Lameter <cl@...ux-foundation.org>,
Matt Mackall <mpm@...enic.com>,
Haicheng Li <haicheng.li@...ux.intel.com>,
Pekka Enberg <penberg@...helsinki.fi>
Subject: [023/145] slab: initialize unused alien cache entry as NULL at alloc_alien_cache().
2.6.32-stable review patch. If anyone has any objections, please let me know.
----------------
From: Haicheng Li <haicheng.li@...ux.intel.com>
commit f3186a9c51eabe75b2780153ed7f07778d78b16e upstream.
Comparing with existing code, it's a simpler way to use kzalloc_node()
to ensure that each unused alien cache entry is NULL.
CC: Eric Dumazet <eric.dumazet@...il.com>
Acked-by: Andi Kleen <ak@...ux.intel.com>
Acked-by: Christoph Lameter <cl@...ux-foundation.org>
Acked-by: Matt Mackall <mpm@...enic.com>
Signed-off-by: Haicheng Li <haicheng.li@...ux.intel.com>
Signed-off-by: Pekka Enberg <penberg@...helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@...e.de>
---
mm/slab.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -971,13 +971,11 @@ static struct array_cache **alloc_alien_
if (limit > 1)
limit = 12;
- ac_ptr = kmalloc_node(memsize, gfp, node);
+ ac_ptr = kzalloc_node(memsize, gfp, node);
if (ac_ptr) {
for_each_node(i) {
- if (i == node || !node_online(i)) {
- ac_ptr[i] = NULL;
+ if (i == node || !node_online(i))
continue;
- }
ac_ptr[i] = alloc_arraycache(node, limit, 0xbaadf00d, gfp);
if (!ac_ptr[i]) {
for (i--; i >= 0; i--)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists