aboutsummaryrefslogtreecommitdiffstats
path: root/mm/memcontrol.c
diff options
context:
space:
mode:
authorQiang Huang <h.huangqiang@huawei.com>2013-11-12 18:08:22 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-11-12 22:09:10 -0500
commitf35c3a8eed52878c2dde9c4b9a87b276127f7f8d (patch)
tree700a9504da128ad71421e7d9907736f8e7d056d9 /mm/memcontrol.c
parent2afc745f3e3079ab16c826be4860da2529054dd2 (diff)
memcg, kmem: use is_root_cache instead of hard code
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com> Reviewed-by: Pekka Enberg <penberg@kernel.org> Acked-by: David Rientjes <rientjes@google.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Michal Hocko <mhocko@suse.cz> Cc: Glauber Costa <glommer@parallels.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/memcontrol.c')
-rw-r--r--mm/memcontrol.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index c89072443166..3d28d5a61efd 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -59,6 +59,7 @@
59#include <net/sock.h> 59#include <net/sock.h>
60#include <net/ip.h> 60#include <net/ip.h>
61#include <net/tcp_memcontrol.h> 61#include <net/tcp_memcontrol.h>
62#include "slab.h"
62 63
63#include <asm/uaccess.h> 64#include <asm/uaccess.h>
64 65
@@ -3131,7 +3132,7 @@ int memcg_update_cache_size(struct kmem_cache *s, int num_groups)
3131{ 3132{
3132 struct memcg_cache_params *cur_params = s->memcg_params; 3133 struct memcg_cache_params *cur_params = s->memcg_params;
3133 3134
3134 VM_BUG_ON(s->memcg_params && !s->memcg_params->is_root_cache); 3135 VM_BUG_ON(!is_root_cache(s));
3135 3136
3136 if (num_groups > memcg_limited_groups_array_size) { 3137 if (num_groups > memcg_limited_groups_array_size) {
3137 int i; 3138 int i;