mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/2][RESEND] slab, cleanup: remove unneeded return
@ 2011-08-26 16:26 Zhao Jin
  2011-08-26 16:33 ` Christoph Lameter
  0 siblings, 1 reply; 2+ messages in thread
From: Zhao Jin @ 2011-08-26 16:26 UTC (permalink / raw)
  To: cl, penberg, mpm; +Cc: linux-kernel, Zhao Jin

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>
---
 mm/slab.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/mm/slab.c b/mm/slab.c
index 6d90a09..82e0a0e 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -3678,13 +3678,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;
 }
 
 /**
-- 
1.7.4.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/2][RESEND] slab, cleanup: remove unneeded return
  2011-08-26 16:26 [PATCH 1/2][RESEND] slab, cleanup: remove unneeded return Zhao Jin
@ 2011-08-26 16:33 ` Christoph Lameter
  0 siblings, 0 replies; 2+ messages in thread
From: Christoph Lameter @ 2011-08-26 16:33 UTC (permalink / raw)
  To: Zhao Jin; +Cc: penberg, mpm, linux-kernel

On Sat, 27 Aug 2011, Zhao Jin wrote:

> The procedure ends right after the if-statement, so remove ``return''.
> Also move the last common statement outside.

Acked-by: Christoph Lameter <cl@linux.com>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-08-26 16:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-26 16:26 [PATCH 1/2][RESEND] slab, cleanup: remove unneeded return Zhao Jin
2011-08-26 16:33 ` Christoph Lameter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®