aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhao Jin <cronozhj@gmail.com>2011-08-27 00:26:17 +0800
committerPekka Enberg <penberg@kernel.org>2012-01-23 15:32:26 +0200
commit42c8c99cd891184bf4bcf6f09d62c54e42599453 (patch)
tree436001fd4cd0aba57c67164d242490a2fbefaa1a
parentdcd6c92267155e70a94b3927bce681ce74b80d1f (diff)
slab, cleanup: remove unneeded return
The procedure ends right after the if-statement, so remove ``return''. Also move the last common statement outside. Signed-off-by: Zhao Jin <cronozhj@gmail.com> Acked-by: David Rientjes <rientjes@google.com> Acked-by: Christoph Lameter <cl@linux.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
-rw-r--r--mm/slab.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/mm/slab.c b/mm/slab.c
index f0bd7857ab3..806a754fad8 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -3693,13 +3693,12 @@ static inline void __cache_free(struct kmem_cache *cachep, void *objp,
if (likely(ac->avail < ac->limit)) {
STATS_INC_FREEHIT(cachep);
- ac->entry[ac->avail++] = objp;
- return;
} else {
STATS_INC_FREEMISS(cachep);
cache_flusharray(cachep, ac);
- ac->entry[ac->avail++] = objp;
}
+
+ ac->entry[ac->avail++] = objp;
}
/**