From: Qiang Huang Date: Tue, 12 Nov 2013 23:08:22 +0000 (-0800) Subject: memcg, kmem: use is_root_cache instead of hard code X-Git-Tag: v3.13-rc1~106^2~190 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f35c3a8eed52878c2dde9c4b9a87b276127f7f8d;p=kernel%2Fkernel-generic.git memcg, kmem: use is_root_cache instead of hard code Signed-off-by: Qiang Huang Reviewed-by: Pekka Enberg Acked-by: David Rientjes Cc: Johannes Weiner Cc: Michal Hocko Cc: Glauber Costa Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/memcontrol.c b/mm/memcontrol.c index c890724..3d28d5a 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -59,6 +59,7 @@ #include #include #include +#include "slab.h" #include @@ -3131,7 +3132,7 @@ int memcg_update_cache_size(struct kmem_cache *s, int num_groups) { struct memcg_cache_params *cur_params = s->memcg_params; - VM_BUG_ON(s->memcg_params && !s->memcg_params->is_root_cache); + VM_BUG_ON(!is_root_cache(s)); if (num_groups > memcg_limited_groups_array_size) { int i;