aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2009-11-29 10:46:17 -0500
committerDavid S. Miller <davem@davemloft.net>2009-12-01 19:16:00 -0500
commit65c0cfafce9575319fb6f70080fbe226e5617e3b (patch)
treee1e0a276860f74ee0fe6747c8455a8ec0e7c2d03 /include
parent671011720baa222b6de667cd688aed4dc8908924 (diff)
net: remove [un]register_pernet_gen_... and update the docs.
No that all of the callers have been updated to set fields in struct pernet_operations, and simplified to let the network namespace core handle the allocation and freeing of the storage for them, remove the surpurpflous methods and update the docs to the new style. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/net_namespace.h22
-rw-r--r--include/net/netns/generic.h8
2 files changed, 5 insertions, 25 deletions
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
index 080774b9dbf3..24a8c5591f63 100644
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -264,28 +264,6 @@ extern void unregister_pernet_subsys(struct pernet_operations *);
264extern int register_pernet_device(struct pernet_operations *); 264extern int register_pernet_device(struct pernet_operations *);
265extern void unregister_pernet_device(struct pernet_operations *); 265extern void unregister_pernet_device(struct pernet_operations *);
266 266
267static inline int register_pernet_gen_subsys(int *id, struct pernet_operations *ops)
268{
269 ops->id = id;
270 return register_pernet_subsys(ops);
271}
272
273static inline void unregister_pernet_gen_subsys(int id, struct pernet_operations *ops)
274{
275 return unregister_pernet_subsys(ops);
276}
277
278static inline int register_pernet_gen_device(int *id, struct pernet_operations *ops)
279{
280 ops->id = id;
281 return register_pernet_device(ops);
282}
283
284static inline void unregister_pernet_gen_device(int id, struct pernet_operations *ops)
285{
286 return unregister_pernet_device(ops);
287}
288
289struct ctl_path; 267struct ctl_path;
290struct ctl_table; 268struct ctl_table;
291struct ctl_table_header; 269struct ctl_table_header;
diff --git a/include/net/netns/generic.h b/include/net/netns/generic.h
index 0c04fd2a700b..ff4982ab84b6 100644
--- a/include/net/netns/generic.h
+++ b/include/net/netns/generic.h
@@ -12,9 +12,11 @@
12 * stuff on the struct net without explicit struct net modification 12 * stuff on the struct net without explicit struct net modification
13 * 13 *
14 * The rules are simple: 14 * The rules are simple:
15 * 1. register the ops with register_pernet_gen_device to get the id 15 * 1. set pernet_operations->id. After register_pernet_device you
16 * of your private pointer; 16 * will have the id of your private pointer.
17 * 2. call net_assign_generic() to put the private data on the struct 17 * 2. Either set pernet_operations->size (to have the code allocate and
18 * free a private structure pointed to from struct net ) or
19 * call net_assign_generic() to put the private data on the struct
18 * net (most preferably this should be done in the ->init callback 20 * net (most preferably this should be done in the ->init callback
19 * of the ops registered); 21 * of the ops registered);
20 * 3. do not change this pointer while the net is alive; 22 * 3. do not change this pointer while the net is alive;