slab, cleanup: remove unneeded return
authorZhao Jin <cronozhj@gmail.com>
Fri, 26 Aug 2011 16:26:17 +0000 (00:26 +0800)
committerPekka Enberg <penberg@kernel.org>
Mon, 23 Jan 2012 13:32:26 +0000 (15:32 +0200)
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>
mm/slab.c

index f0bd7857ab3bed2adf6649e60dda6ad712ef0b92..806a754fad8efc9bc90c098930c43d54bd11306b 100644 (file)
--- 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;
 }
 
 /**