Skip to contentSkip to conversation

memcg: fix SLOB build regression

PATCH In review Arnd Bergmann 2 participants 2 messages Dec 18, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 memcg: fix SLOB build regression

A recent cleanup broke the build when CONFIG_SLOB is used:

mm/memcontrol.c: In function 'memcg_update_kmem_limit':
mm/memcontrol.c:2974:9: error: implicit declaration of function 'memcg_online_kmem' [-Werror=implicit-function-declaration] mm/memcontrol.c: In function 'mem_cgroup_css_alloc':
mm/memcontrol.c:4229:10: error: too many arguments to function 'memcg_propagate_kmem' mm/memcontrol.c:2949:12: note: declared here

This fixes the memcg_propagate_kmem prototype to match the normal implementation and adds the respective memcg_online_kmem helper function that was needed.

Fixes a5ed904c5039 ("mm: memcontrol: clean up alloc, online, offline, free functions")

---
This just showed up on ARM randconfig builds with linux-next, please apply or fold into the original patch

mm/memcontrol.c +5 -1
index 48b22c3545b1..4637199e69d6 100644
@@ -2946,7 +2946,11 @@ static void memcg_free_kmem(struct mem_cgroup *memcg)
 	}
 }
 #else
-static int memcg_propagate_kmem(struct mem_cgroup *memcg)
+static int memcg_propagate_kmem(struct mem_cgroup *parent, struct mem_cgroup *memcg)
+{
+	return 0;
+}
+static int memcg_online_kmem(struct mem_cgroup *memcg)
 {
 	return 0;
 }
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Arnd Bergmann

A recent cleanup broke the build when CONFIG_SLOB is used:

mm/memcontrol.c: In function 'memcg_update_kmem_limit':
mm/memcontrol.c:2974:9: error: implicit declaration of function 'memcg_online_kmem' [-Werror=implicit-function-declaration] mm/memcontrol.c: In function 'mem_cgroup_css_alloc':
mm/memcontrol.c:4229:10: error: too many arguments to function 'memcg_propagate_kmem' mm/memcontrol.c:2949:12: note: declared here

Quoted 6 lines

This fixes the memcg_propagate_kmem prototype to match the normal implementation and adds the respective memcg_online_kmem helper function that was needed.

Fixes a5ed904c5039 ("mm: memcontrol: clean up alloc, online, offline, free functions")

I am slob.