diff options
author | Hugh Dickins <hughd@google.com> | 2013-02-22 19:35:50 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-23 20:50:22 -0500 |
commit | 6d04399040ca9058c12c766bbbefbf6acdb2eabe (patch) | |
tree | a8612169e98223892f3966fde87b0ac7c5c03d41 /mm/memcontrol.c | |
parent | 7293bfba03e8283e29558c20aee279642f619c43 (diff) |
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>
Diffstat (limited to 'mm/memcontrol.c')
-rw-r--r-- | mm/memcontrol.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index d4f0a831c9e6..53b8201b31eb 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c | |||
@@ -5025,6 +5025,7 @@ out: | |||
5025 | return ret; | 5025 | return ret; |
5026 | } | 5026 | } |
5027 | 5027 | ||
5028 | #ifdef CONFIG_MEMCG_KMEM | ||
5028 | static int memcg_propagate_kmem(struct mem_cgroup *memcg) | 5029 | static int memcg_propagate_kmem(struct mem_cgroup *memcg) |
5029 | { | 5030 | { |
5030 | int ret = 0; | 5031 | int ret = 0; |
@@ -5033,7 +5034,6 @@ static int memcg_propagate_kmem(struct mem_cgroup *memcg) | |||
5033 | goto out; | 5034 | goto out; |
5034 | 5035 | ||
5035 | memcg->kmem_account_flags = parent->kmem_account_flags; | 5036 | memcg->kmem_account_flags = parent->kmem_account_flags; |
5036 | #ifdef CONFIG_MEMCG_KMEM | ||
5037 | /* | 5037 | /* |
5038 | * When that happen, we need to disable the static branch only on those | 5038 | * When that happen, we need to disable the static branch only on those |
5039 | * memcgs that enabled it. To achieve this, we would be forced to | 5039 | * 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) | |||
5059 | mutex_lock(&set_limit_mutex); | 5059 | mutex_lock(&set_limit_mutex); |
5060 | ret = memcg_update_cache_sizes(memcg); | 5060 | ret = memcg_update_cache_sizes(memcg); |
5061 | mutex_unlock(&set_limit_mutex); | 5061 | mutex_unlock(&set_limit_mutex); |
5062 | #endif | ||
5063 | out: | 5062 | out: |
5064 | return ret; | 5063 | return ret; |
5065 | } | 5064 | } |
5065 | #endif /* CONFIG_MEMCG_KMEM */ | ||
5066 | 5066 | ||
5067 | /* | 5067 | /* |
5068 | * The user of this function is... | 5068 | * The user of this function is... |