Commit 6d043990 authored by Hugh Dickins's avatar Hugh Dickins Committed by Linus Torvalds

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: default avatarHugh Dickins <>
Acked-by: default avatarMichal Hocko <>
Cc: Glauber Costa <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 7293bfba
......@@ -5025,6 +5025,7 @@ out:
return ret;
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;
* 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)
ret = memcg_update_cache_sizes(memcg);
return ret;
#endif /* CONFIG_MEMCG_KMEM */
* The user of this function is...
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment