From 710e6a2386918a285de9ed6153be0cff1a56b64f Mon Sep 17 00:00:00 2001 From: "Eric W. Biederman" Date: Sun, 29 Nov 2009 15:46:17 +0000 Subject: [PATCH] --- yaml --- r: 172052 b: refs/heads/master c: 65c0cfafce9575319fb6f70080fbe226e5617e3b h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/net/net_namespace.h | 22 ---------------------- trunk/include/net/netns/generic.h | 8 +++++--- 3 files changed, 6 insertions(+), 26 deletions(-) diff --git a/[refs] b/[refs] index 52c3a1ed64ca..b58dbff9e624 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 671011720baa222b6de667cd688aed4dc8908924 +refs/heads/master: 65c0cfafce9575319fb6f70080fbe226e5617e3b diff --git a/trunk/include/net/net_namespace.h b/trunk/include/net/net_namespace.h index 080774b9dbf3..24a8c5591f63 100644 --- a/trunk/include/net/net_namespace.h +++ b/trunk/include/net/net_namespace.h @@ -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; diff --git a/trunk/include/net/netns/generic.h b/trunk/include/net/netns/generic.h index 0c04fd2a700b..ff4982ab84b6 100644 --- a/trunk/include/net/netns/generic.h +++ b/trunk/include/net/netns/generic.h @@ -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;