lkml.org 
[lkml]   [2012]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch for-linus] memcg, kmem: fix build error when CONFIG_INET is disabled
Commit e1aab161e013 ("socket: initial cgroup code.") causes a build error 
when CONFIG_INET is disabled in Linus' tree:

net/built-in.o: In function `sk_update_clone':
net/core/sock.c:1336: undefined reference to `sock_update_memcg'

sock_update_memcg() is only defined when CONFIG_INET is enabled, so fix it
by defining the dummy function without this option.

Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: David Rientjes <rientjes@google.com>
---
Checking the logs, Randy reported this in an email to LKML on
September 24 and didn't get a response...

include/linux/memcontrol.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -396,7 +396,7 @@ enum {
};

struct sock;
-#ifdef CONFIG_MEMCG_KMEM
+#if defined(CONFIG_INET) && defined(CONFIG_MEMCG_KMEM)
void sock_update_memcg(struct sock *sk);
void sock_release_memcg(struct sock *sk);
#else
@@ -406,6 +406,6 @@ static inline void sock_update_memcg(struct sock *sk)
static inline void sock_release_memcg(struct sock *sk)
{
}
-#endif /* CONFIG_MEMCG_KMEM */
+#endif /* CONFIG_INET && CONFIG_MEMCG_KMEM */
#endif /* _LINUX_MEMCONTROL_H */


\
 
 \ /
  Last update: 2012-10-10 09:21    [W:0.061 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site