Commit d8d211a2 authored by Kirill Tkhai's avatar Kirill Tkhai Committed by David S. Miller

net: Make extern and export get_net_ns()

This function will be used to obtain net of tun device.
Signed-off-by: default avatarKirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent bdc8587a
...@@ -353,4 +353,6 @@ extern int __sys_recvmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen ...@@ -353,4 +353,6 @@ extern int __sys_recvmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen
unsigned int flags, struct timespec *timeout); unsigned int flags, struct timespec *timeout);
extern int __sys_sendmmsg(int fd, struct mmsghdr __user *mmsg, extern int __sys_sendmmsg(int fd, struct mmsghdr __user *mmsg,
unsigned int vlen, unsigned int flags); unsigned int vlen, unsigned int flags);
extern struct ns_common *get_net_ns(struct ns_common *ns);
#endif /* _LINUX_SOCKET_H */ #endif /* _LINUX_SOCKET_H */
...@@ -990,10 +990,11 @@ static long sock_do_ioctl(struct net *net, struct socket *sock, ...@@ -990,10 +990,11 @@ static long sock_do_ioctl(struct net *net, struct socket *sock,
* what to do with it - that's up to the protocol still. * what to do with it - that's up to the protocol still.
*/ */
static struct ns_common *get_net_ns(struct ns_common *ns) struct ns_common *get_net_ns(struct ns_common *ns)
{ {
return &get_net(container_of(ns, struct net, ns))->ns; return &get_net(container_of(ns, struct net, ns))->ns;
} }
EXPORT_SYMBOL_GPL(get_net_ns);
static long sock_ioctl(struct file *file, unsigned cmd, unsigned long arg) static long sock_ioctl(struct file *file, unsigned cmd, unsigned long arg)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment