diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2015-09-21 20:02:59 +0200 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2015-09-24 02:34:43 +0200 |
commit | 7c6c21ee94452081a5219667851d2084a45c5009 (patch) | |
tree | 51813a3c98852b04795a44eecfe21da13db2782f /include/net/ip_vs.h | |
parent | ipvs: Pass ipvs not net to ip_vs_protocol_net_(init|cleanup) (diff) | |
download | linux-7c6c21ee94452081a5219667851d2084a45c5009.tar.xz linux-7c6c21ee94452081a5219667851d2084a45c5009.zip |
ipvs: Remove skb_net
This hack has no more users so remove it.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'include/net/ip_vs.h')
-rw-r--r-- | include/net/ip_vs.h | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index 00318d63a565..d621330d423c 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h @@ -38,37 +38,6 @@ static inline struct netns_ipvs *net_ipvs(struct net* net) return net->ipvs; } -/* Get net ptr from skb in traffic cases - * use skb_sknet when call is from userland (ioctl or netlink) - */ -static inline struct net *skb_net(const struct sk_buff *skb) -{ -#ifdef CONFIG_NET_NS -#ifdef CONFIG_IP_VS_DEBUG - /* - * This is used for debug only. - * Start with the most likely hit - * End with BUG - */ - if (likely(skb->dev && dev_net(skb->dev))) - return dev_net(skb->dev); - if (skb_dst(skb) && skb_dst(skb)->dev) - return dev_net(skb_dst(skb)->dev); - WARN(skb->sk, "Maybe skb_sknet should be used in %s() at line:%d\n", - __func__, __LINE__); - if (likely(skb->sk && sock_net(skb->sk))) - return sock_net(skb->sk); - pr_err("There is no net ptr to find in the skb in %s() line:%d\n", - __func__, __LINE__); - BUG(); -#else - return dev_net(skb->dev ? : skb_dst(skb)->dev); -#endif -#else - return &init_net; -#endif -} - static inline struct net *skb_sknet(const struct sk_buff *skb) { #ifdef CONFIG_NET_NS |