diff --git a/[refs] b/[refs] index d971e8b1b84f..14db70fb1384 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 072ee3f9bd26a2f89a79d1eae9052d30b8d745a5 +refs/heads/master: ed160e839d2e1118529e58b04d52dba703ca629c diff --git a/trunk/net/core/net_namespace.c b/trunk/net/core/net_namespace.c index 3f6d37deac45..383252b50411 100644 --- a/trunk/net/core/net_namespace.c +++ b/trunk/net/core/net_namespace.c @@ -188,6 +188,7 @@ static int __init net_ns_init(void) pure_initcall(net_ns_init); +#ifdef CONFIG_NET_NS static int register_pernet_operations(struct list_head *list, struct pernet_operations *ops) { @@ -228,6 +229,23 @@ static void unregister_pernet_operations(struct pernet_operations *ops) ops->exit(net); } +#else + +static int register_pernet_operations(struct list_head *list, + struct pernet_operations *ops) +{ + if (ops->init == NULL) + return 0; + return ops->init(&init_net); +} + +static void unregister_pernet_operations(struct pernet_operations *ops) +{ + if (ops->exit) + ops->exit(&init_net); +} +#endif + /** * register_pernet_subsys - register a network namespace subsystem * @ops: pernet operations structure for the subsystem