Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 73623
b: refs/heads/master
c: ed160e8
h: refs/heads/master
i:
  73621: 5e54153
  73619: 7862aae
  73615: 853d467
v: v3
  • Loading branch information
Denis V. Lunev authored and David S. Miller committed Nov 13, 2007
1 parent 78d58b9 commit 465bb0e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 072ee3f9bd26a2f89a79d1eae9052d30b8d745a5
refs/heads/master: ed160e839d2e1118529e58b04d52dba703ca629c
18 changes: 18 additions & 0 deletions trunk/net/core/net_namespace.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 465bb0e

Please sign in to comment.