linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH TRIVIAL] memcg: remove unused code from kmem_cache_destroy_work_func
@ 2014-01-20  9:22 Vladimir Davydov
  2014-01-20 16:48 ` Michal Hocko
  0 siblings, 1 reply; 2+ messages in thread
From: Vladimir Davydov @ 2014-01-20  9:22 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, linux-mm

Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>
---
 mm/memcontrol.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 7f1a356..7f1511d 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -3311,11 +3311,9 @@ static void kmem_cache_destroy_work_func(struct work_struct *w)
 	 * So if we aren't down to zero, we'll just schedule a worker and try
 	 * again
 	 */
-	if (atomic_read(&cachep->memcg_params->nr_pages) != 0) {
+	if (atomic_read(&cachep->memcg_params->nr_pages) != 0)
 		kmem_cache_shrink(cachep);
-		if (atomic_read(&cachep->memcg_params->nr_pages) == 0)
-			return;
-	} else
+	else
 		kmem_cache_destroy(cachep);
 }
 
-- 
1.7.10.4

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

end of thread, other threads:[~2014-01-20 16:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-20  9:22 [PATCH TRIVIAL] memcg: remove unused code from kmem_cache_destroy_work_func Vladimir Davydov
2014-01-20 16:48 ` Michal Hocko

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