linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [patch for-linus] memcg, kmem: fix build error when CONFIG_INET is disabled
@ 2012-10-10  6:32 David Rientjes
  2012-10-10  8:56 ` Glauber Costa
  2012-10-10  9:27 ` Michal Hocko
  0 siblings, 2 replies; 8+ messages in thread
From: David Rientjes @ 2012-10-10  6:32 UTC (permalink / raw)
  To: Andrew Morton, Linus Torvalds
  Cc: Randy Dunlap, KAMEZAWA Hiroyuki, Kirill A. Shutemov,
	David S. Miller, Eric W. Biederman, Eric Dumazet, Glauber Costa,
	linux-kernel, linux-mm

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 */
 

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-10-10 20:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-10  6:32 [patch for-linus] memcg, kmem: fix build error when CONFIG_INET is disabled David Rientjes
2012-10-10  8:56 ` Glauber Costa
2012-10-10  9:27   ` Michal Hocko
2012-10-10  9:29     ` Glauber Costa
2012-10-10 14:33       ` Fengguang Wu
2012-10-10 20:17         ` David Rientjes
2012-10-10 20:27           ` Glauber Costa
2012-10-10  9:27 ` Michal Hocko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).