Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: Make extern and export get_net_ns()

This function will be used to obtain net of tun device.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Kirill Tkhai and committed by
David S. Miller
d8d211a2 bdc8587a

+4 -1
+2
include/linux/socket.h
··· 353 353 unsigned int flags, struct timespec *timeout); 354 354 extern int __sys_sendmmsg(int fd, struct mmsghdr __user *mmsg, 355 355 unsigned int vlen, unsigned int flags); 356 + 357 + extern struct ns_common *get_net_ns(struct ns_common *ns); 356 358 #endif /* _LINUX_SOCKET_H */
+2 -1
net/socket.c
··· 990 990 * what to do with it - that's up to the protocol still. 991 991 */ 992 992 993 - static struct ns_common *get_net_ns(struct ns_common *ns) 993 + struct ns_common *get_net_ns(struct ns_common *ns) 994 994 { 995 995 return &get_net(container_of(ns, struct net, ns))->ns; 996 996 } 997 + EXPORT_SYMBOL_GPL(get_net_ns); 997 998 998 999 static long sock_ioctl(struct file *file, unsigned cmd, unsigned long arg) 999 1000 {