diff options
author | Christoph Lameter <cl@linux.com> | 2011-08-09 17:12:23 -0400 |
---|---|---|
committer | Pekka Enberg <penberg@kernel.org> | 2011-08-19 12:34:25 -0400 |
commit | 7db0d7054048da140798d8bfdd7fff5f74f85abf (patch) | |
tree | e23816d3d5a6c25ec1037989ce4857e96440a0fa | |
parent | 69cb8e6b7c2982e015d2b35a34ac2674c79e801c (diff) |
slub: Remove useless statements in __slab_alloc
Two statements in __slab_alloc() do not have any effect.
1. c->page is already set to NULL by deactivate_slab() called right before.
2. gfpflags are masked in new_slab() before being passed to the page
allocator. There is no need to mask gfpflags in __slab_alloc in particular
since most frequent processing in __slab_alloc does not require the use of a
gfpmask.
Cc: torvalds@linux-foundation.org
Signed-off-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
-rw-r--r-- | mm/slub.c | 4 |
1 files changed, 0 insertions, 4 deletions
@@ -2064,9 +2064,6 @@ static void *__slab_alloc(struct kmem_cache *s, gfp_t gfpflags, int node, | |||
2064 | c = this_cpu_ptr(s->cpu_slab); | 2064 | c = this_cpu_ptr(s->cpu_slab); |
2065 | #endif | 2065 | #endif |
2066 | 2066 | ||
2067 | /* We handle __GFP_ZERO in the caller */ | ||
2068 | gfpflags &= ~__GFP_ZERO; | ||
2069 | |||
2070 | page = c->page; | 2067 | page = c->page; |
2071 | if (!page) | 2068 | if (!page) |
2072 | goto new_slab; | 2069 | goto new_slab; |
@@ -2163,7 +2160,6 @@ debug: | |||
2163 | 2160 | ||
2164 | c->freelist = get_freepointer(s, object); | 2161 | c->freelist = get_freepointer(s, object); |
2165 | deactivate_slab(s, c); | 2162 | deactivate_slab(s, c); |
2166 | c->page = NULL; | ||
2167 | c->node = NUMA_NO_NODE; | 2163 | c->node = NUMA_NO_NODE; |
2168 | local_irq_restore(flags); | 2164 | local_irq_restore(flags); |
2169 | return object; | 2165 | return object; |