aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2010-04-22 21:40:47 -0400
committerDavid S. Miller <davem@davemloft.net>2010-04-27 18:49:02 -0400
commit05fceb4ad7e8bf809a2a97061d6273d27d1a8449 (patch)
treea66511ff88417f12fd7a43c6f9a7c0a34662d6e5 /include
parent47d54d65826c4a498070a5e0e1d74ce665402b4d (diff)
net: disallow to use net_assign_generic externally
Now there's no need to use this fuction directly because it's handled by register_pernet_device. So to make this simple and easy to understand, make this static to do not tempt potentional users. Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/netns/generic.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/include/net/netns/generic.h b/include/net/netns/generic.h
index ff4982ab84b6..81a31c0db3e7 100644
--- a/include/net/netns/generic.h
+++ b/include/net/netns/generic.h
@@ -14,11 +14,8 @@
14 * The rules are simple: 14 * The rules are simple:
15 * 1. set pernet_operations->id. After register_pernet_device you 15 * 1. set pernet_operations->id. After register_pernet_device you
16 * will have the id of your private pointer. 16 * will have the id of your private pointer.
17 * 2. Either set pernet_operations->size (to have the code allocate and 17 * 2. set pernet_operations->size to have the code allocate and free
18 * free a private structure pointed to from struct net ) or 18 * a private structure pointed to from struct net.
19 * call net_assign_generic() to put the private data on the struct
20 * net (most preferably this should be done in the ->init callback
21 * of the ops registered);
22 * 3. do not change this pointer while the net is alive; 19 * 3. do not change this pointer while the net is alive;
23 * 4. do not try to have any private reference on the net_generic object. 20 * 4. do not try to have any private reference on the net_generic object.
24 * 21 *
@@ -46,6 +43,4 @@ static inline void *net_generic(struct net *net, int id)
46 43
47 return ptr; 44 return ptr;
48} 45}
49
50extern int net_assign_generic(struct net *net, int id, void *data);
51#endif 46#endif