Make it possible to build IP stack as a module

This is not pretty, but it works.
This commit is contained in:
Ole André Vadla Ravnås 2022-05-10 00:47:37 +02:00
parent 9dc4573cce
commit 77b228276c
26 changed files with 1494 additions and 25 deletions

View file

@ -280,9 +280,15 @@ static struct cftype tcp_files[] = {
{ } /* terminate */
};
#ifdef CONFIG_INET_MODULE
int tcp_memcontrol_init(void)
#else
static int __init tcp_memcontrol_init(void)
#endif
{
WARN_ON(cgroup_add_cftypes(&mem_cgroup_subsys, tcp_files));
return 0;
}
#ifndef CONFIG_INET_MODULE
__initcall(tcp_memcontrol_init);
#endif