Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 172052
b: refs/heads/master
c: 65c0cfa
h: refs/heads/master
v: v3
  • Loading branch information
Eric W. Biederman authored and David S. Miller committed Dec 2, 2009
1 parent ff41727 commit 710e6a2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 26 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 671011720baa222b6de667cd688aed4dc8908924
refs/heads/master: 65c0cfafce9575319fb6f70080fbe226e5617e3b
22 changes: 0 additions & 22 deletions trunk/include/net/net_namespace.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,28 +264,6 @@ extern void unregister_pernet_subsys(struct pernet_operations *);
extern int register_pernet_device(struct pernet_operations *);
extern void unregister_pernet_device(struct pernet_operations *);

static inline int register_pernet_gen_subsys(int *id, struct pernet_operations *ops)
{
ops->id = id;
return register_pernet_subsys(ops);
}

static inline void unregister_pernet_gen_subsys(int id, struct pernet_operations *ops)
{
return unregister_pernet_subsys(ops);
}

static inline int register_pernet_gen_device(int *id, struct pernet_operations *ops)
{
ops->id = id;
return register_pernet_device(ops);
}

static inline void unregister_pernet_gen_device(int id, struct pernet_operations *ops)
{
return unregister_pernet_device(ops);
}

struct ctl_path;
struct ctl_table;
struct ctl_table_header;
Expand Down
8 changes: 5 additions & 3 deletions trunk/include/net/netns/generic.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@
* stuff on the struct net without explicit struct net modification
*
* The rules are simple:
* 1. register the ops with register_pernet_gen_device to get the id
* of your private pointer;
* 2. call net_assign_generic() to put the private data on the struct
* 1. set pernet_operations->id. After register_pernet_device you
* will have the id of your private pointer.
* 2. Either set pernet_operations->size (to have the code allocate and
* free a private structure pointed to from struct net ) or
* call net_assign_generic() to put the private data on the struct
* net (most preferably this should be done in the ->init callback
* of the ops registered);
* 3. do not change this pointer while the net is alive;
Expand Down

0 comments on commit 710e6a2

Please sign in to comment.