aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-07-10 05:51:35 -0400
committerDavid S. Miller <davem@davemloft.net>2009-07-12 17:03:28 -0400
commit30ffee8480c13fbcf8ab6c28e31f79dfff683117 (patch)
treeca86e974221761b813811047286142804f906ee2 /include/net
parent134e63756d5f3d0f7604dfcca847b09d1b14fd66 (diff)
net: move and export get_net_ns_by_pid
The function get_net_ns_by_pid(), to get a network namespace from a pid_t, will be required in cfg80211 as well. Therefore, let's move it to net_namespace.c and export it. We can't make it a static inline in the !NETNS case because it needs to verify that the given pid even exists (and return -ESRCH). Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/net_namespace.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
index 3173d12d946b..3882db1e263a 100644
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -108,6 +108,8 @@ static inline struct net *copy_net_ns(unsigned long flags, struct net *net_ns)
108 108
109extern struct list_head net_namespace_list; 109extern struct list_head net_namespace_list;
110 110
111extern struct net *get_net_ns_by_pid(pid_t pid);
112
111#ifdef CONFIG_NET_NS 113#ifdef CONFIG_NET_NS
112extern void __put_net(struct net *net); 114extern void __put_net(struct net *net);
113 115