net: sock: Add ifdef CONFIG_MEMCG_KMEM for mem_cgroup_sockets_{init,destroy}
Subsystems (5)
PATCH 1/1 net: sock: Add ifdef CONFIG_MEMCG_KMEM for mem_cgroup_sockets_{init,destroy}
When "CONFIG_MEMCG_KMEM=n" I see this in my build-log:
...
LD init/built-in.omm/built-in.o: In function `mem_cgroup_css_free':
memcontrol.c:(.text+0x5caa6): undefined reference to `mem_cgroup_sockets_destroy' make[2]: *** [vmlinux] Error 1
Inspired by the ifdef for mem_cgroup_sockets_{init,destroy} here...
[ net/core/sock.c ]
...
int mem_cgroup_sockets_init()
...
void mem_cgroup_sockets_destroy()
...
...I did the the same for both in "include/net/sock.h".
This fixes the issue for me in next-20130703.
--- include/net/sock.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
include/net/sock.h +3 -1
@@ -71,6 +71,7 @@struct cgroup ;struct cgroup_subsys ;#ifdef CONFIG_NET +#ifdef CONFIG_MEMCG_KMEM int mem_cgroup_sockets_init (struct mem_cgroup *memcg,struct cgroup_subsys *ss);void mem_cgroup_sockets_destroy (struct mem_cgroup *memcg);#else
@@ -83,7 +84,8 @@ static inlinevoid mem_cgroup_sockets_destroy (struct mem_cgroup *memcg) { } -#endif +#endif /* CONFIG_NET */ +#endif /* CONFIG_MEMCG_KMEM */ /* * This structure really needs to be cleaned up. * Most of it is for TCP, and not used by any of
Signature · 7 lines
1.8.3.2 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Hello.
Quoted 38 lines · Sedat Dilek
When "
CONFIG_MEMCG_KMEM=n" I see this in my build-log:
...
LDinit/built-in.omm/built-in.o: In function `mem_cgroup_css_free':
memcontrol.c:(.text+0x5caa6): undefined reference to `mem_cgroup_sockets_destroy' make[2]: *** [vmlinux] Error 1Inspired by the ifdef for mem_cgroup_sockets_{init,destroy} here...
[
net/core/sock.c]
...
intmem_cgroup_sockets_init()
...
voidmem_cgroup_sockets_destroy()
......I did the the same for both in "
include/net/sock.h".This fixes the issue for me in next-20130703.
Signed-off-by Sedat Dilek <[email protected]>--- include/net/sock.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)include/net/sock.h +1
-0@@ -71,6 +71,7 @@struct cgroup ;struct cgroup_subsys ;#ifdef CONFIG_NET +#ifdef CONFIG_MEMCG_KMEM int mem_cgroup_sockets_init (struct mem_cgroup *memcg,struct cgroup_subsys *ss);void mem_cgroup_sockets_destroy (struct mem_cgroup *memcg);#else
include/net/sock.h static inline · line 88
Quoted 6 lines
include/net/sock.h +2
-1@@ -83,7 +84,8 @@ static inlinevoid mem_cgroup_sockets_destroy (struct mem_cgroup *memcg) { } -#endif +#endif /* CONFIG_NET */ +#endif /* CONFIG_MEMCG_KMEM */
You've mixed up the order of comments here. CONFIG_NET should come last.
WBR, Sergei