Skip to content

Commit

Permalink
memcg: remove unused code from kmem_cache_destroy_work_func
Browse files Browse the repository at this point in the history
Signed-off-by: Vladimir Davydov <[email protected]>
Reviewed-by: Michal Hocko <[email protected]>
Cc: Johannes Weiner <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Vladimir Davydov authored and torvalds committed Jan 24, 2014
1 parent 6c14466 commit 0d8a4a3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions mm/memcontrol.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 0d8a4a3

Please sign in to comment.