提交 cd59085a 编写于 作者: D David Rientjes 提交者: Linus Torvalds

memcg, kmem: fix build error when CONFIG_INET is disabled

Commit e1aab161 ("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.
Signed-off-by: NDavid Rientjes <rientjes@google.com>
Reported-by: NRandy Dunlap <rdunlap@xenotime.net>
Cc: Glauber Costa <glommer@parallels.com>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 8dc08395
......@@ -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 */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册