From: Vladimir Davydov Date: Thu, 23 Jan 2014 23:53:39 +0000 (-0800) Subject: memcg: remove unused code from kmem_cache_destroy_work_func X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0d8a4a3799ab007b7a5e50aff9da9558925e0c15;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git memcg: remove unused code from kmem_cache_destroy_work_func Signed-off-by: Vladimir Davydov Reviewed-by: Michal Hocko Cc: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 98f80beeac7f..19d5d4274e22 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -3359,11 +3359,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); }