mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
134e63756d
commit
30ffee8480
3 changed files with 24 additions and 20 deletions
|
@ -108,6 +108,8 @@ static inline struct net *copy_net_ns(unsigned long flags, struct net *net_ns)
|
|||
|
||||
extern struct list_head net_namespace_list;
|
||||
|
||||
extern struct net *get_net_ns_by_pid(pid_t pid);
|
||||
|
||||
#ifdef CONFIG_NET_NS
|
||||
extern void __put_net(struct net *net);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue