Răsfoiți Sursa

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>
Zhao Jin 14 ani în urmă
părinte
comite
42c8c99cd8
1 a modificat fișierele cu 2 adăugiri și 3 ștergeri
  1. 2 3
      mm/slab.c

+ 2 - 3
mm/slab.c

@@ -3693,13 +3693,12 @@ static inline void __cache_free(struct kmem_cache *cachep, void *objp,
 
 
 	if (likely(ac->avail < ac->limit)) {
 	if (likely(ac->avail < ac->limit)) {
 		STATS_INC_FREEHIT(cachep);
 		STATS_INC_FREEHIT(cachep);
-		ac->entry[ac->avail++] = objp;
-		return;
 	} else {
 	} else {
 		STATS_INC_FREEMISS(cachep);
 		STATS_INC_FREEMISS(cachep);
 		cache_flusharray(cachep, ac);
 		cache_flusharray(cachep, ac);
-		ac->entry[ac->avail++] = objp;
 	}
 	}
+
+	ac->entry[ac->avail++] = objp;
 }
 }
 
 
 /**
 /**