diff --git a/mm/memcontrol.c b/mm/memcontrol.c index d4f0a831c9e60a5776a299df35d73439804996f6..53b8201b31eb6f21bf66a3ca26f07fbf39f21c65 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -5025,6 +5025,7 @@ static int memcg_update_kmem_limit(struct cgroup *cont, u64 val) return ret; } +#ifdef CONFIG_MEMCG_KMEM static int memcg_propagate_kmem(struct mem_cgroup *memcg) { int ret = 0; @@ -5033,7 +5034,6 @@ static int memcg_propagate_kmem(struct mem_cgroup *memcg) goto out; memcg->kmem_account_flags = parent->kmem_account_flags; -#ifdef CONFIG_MEMCG_KMEM /* * When that happen, we need to disable the static branch only on those * memcgs that enabled it. To achieve this, we would be forced to @@ -5059,10 +5059,10 @@ static int memcg_propagate_kmem(struct mem_cgroup *memcg) mutex_lock(&set_limit_mutex); ret = memcg_update_cache_sizes(memcg); mutex_unlock(&set_limit_mutex); -#endif out: return ret; } +#endif /* CONFIG_MEMCG_KMEM */ /* * The user of this function is...