memcg: stop warning on memcg_propagate_kmem
Whilst I run the risk of a flogging for disloyalty to the Lord of Sealand, I do have CONFIG_MEMCG=y CONFIG_MEMCG_KMEM not set, and grow tired of the "mm/memcontrol.c:4972:12: warning: `memcg_propagate_kmem' defined but not used [-Wunused-function]" seen in 3.8-rc: move the #ifdef outwards. Signed-off-by: Hugh Dickins <hughd@google.com> Acked-by: 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>
This commit is contained in:
parent
7293bfba03
commit
6d04399040
|
@ -5025,6 +5025,7 @@ out:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_MEMCG_KMEM
|
||||||
static int memcg_propagate_kmem(struct mem_cgroup *memcg)
|
static int memcg_propagate_kmem(struct mem_cgroup *memcg)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
@ -5033,7 +5034,6 @@ static int memcg_propagate_kmem(struct mem_cgroup *memcg)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
memcg->kmem_account_flags = parent->kmem_account_flags;
|
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
|
* 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
|
* 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);
|
mutex_lock(&set_limit_mutex);
|
||||||
ret = memcg_update_cache_sizes(memcg);
|
ret = memcg_update_cache_sizes(memcg);
|
||||||
mutex_unlock(&set_limit_mutex);
|
mutex_unlock(&set_limit_mutex);
|
||||||
#endif
|
|
||||||
out:
|
out:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
#endif /* CONFIG_MEMCG_KMEM */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The user of this function is...
|
* The user of this function is...
|
||||||
|
|
Loading…
Reference in a new issue