Loading include/linux/netdevice.h +1 −5 Original line number Diff line number Diff line Loading @@ -1087,11 +1087,7 @@ static inline void netdev_for_each_tx_queue(struct net_device *dev, static inline struct net *dev_net(const struct net_device *dev) { #ifdef CONFIG_NET_NS return dev->nd_net; #else return &init_net; #endif return read_pnet(&dev->nd_net); } static inline Loading include/net/cfg80211.h +2 −13 Original line number Diff line number Diff line Loading @@ -1330,26 +1330,15 @@ struct wiphy { char priv[0] __attribute__((__aligned__(NETDEV_ALIGN))); }; #ifdef CONFIG_NET_NS static inline struct net *wiphy_net(struct wiphy *wiphy) { return wiphy->_net; } static inline void wiphy_net_set(struct wiphy *wiphy, struct net *net) { wiphy->_net = net; } #else static inline struct net *wiphy_net(struct wiphy *wiphy) { return &init_net; return read_pnet(&wiphy->_net); } static inline void wiphy_net_set(struct wiphy *wiphy, struct net *net) { write_pnet(&wiphy->_net, net); } #endif /** * wiphy_priv - return priv from wiphy Loading include/net/genetlink.h +2 −13 Original line number Diff line number Diff line Loading @@ -68,26 +68,15 @@ struct genl_info { #endif }; #ifdef CONFIG_NET_NS static inline struct net *genl_info_net(struct genl_info *info) { return info->_net; return read_pnet(&info->_net); } static inline void genl_info_net_set(struct genl_info *info, struct net *net) { info->_net = net; write_pnet(&info->_net, net); } #else static inline struct net *genl_info_net(struct genl_info *info) { return &init_net; } static inline void genl_info_net_set(struct genl_info *info, struct net *net) { } #endif /** * struct genl_ops - generic netlink operations Loading include/net/netfilter/nf_conntrack.h +1 −5 Original line number Diff line number Diff line Loading @@ -152,11 +152,7 @@ extern struct net init_net; static inline struct net *nf_ct_net(const struct nf_conn *ct) { #ifdef CONFIG_NET_NS return ct->ct_net; #else return &init_net; #endif return read_pnet(&ct->ct_net); } /* Alter reply tuple (maybe alter helper). */ Loading include/net/sock.h +2 −8 Original line number Diff line number Diff line Loading @@ -1724,19 +1724,13 @@ static inline void sk_eat_skb(struct sock *sk, struct sk_buff *skb, int copied_e static inline struct net *sock_net(const struct sock *sk) { #ifdef CONFIG_NET_NS return sk->sk_net; #else return &init_net; #endif return read_pnet(&sk->sk_net); } static inline void sock_net_set(struct sock *sk, struct net *net) { #ifdef CONFIG_NET_NS sk->sk_net = net; #endif write_pnet(&sk->sk_net, net); } /* Loading Loading
include/linux/netdevice.h +1 −5 Original line number Diff line number Diff line Loading @@ -1087,11 +1087,7 @@ static inline void netdev_for_each_tx_queue(struct net_device *dev, static inline struct net *dev_net(const struct net_device *dev) { #ifdef CONFIG_NET_NS return dev->nd_net; #else return &init_net; #endif return read_pnet(&dev->nd_net); } static inline Loading
include/net/cfg80211.h +2 −13 Original line number Diff line number Diff line Loading @@ -1330,26 +1330,15 @@ struct wiphy { char priv[0] __attribute__((__aligned__(NETDEV_ALIGN))); }; #ifdef CONFIG_NET_NS static inline struct net *wiphy_net(struct wiphy *wiphy) { return wiphy->_net; } static inline void wiphy_net_set(struct wiphy *wiphy, struct net *net) { wiphy->_net = net; } #else static inline struct net *wiphy_net(struct wiphy *wiphy) { return &init_net; return read_pnet(&wiphy->_net); } static inline void wiphy_net_set(struct wiphy *wiphy, struct net *net) { write_pnet(&wiphy->_net, net); } #endif /** * wiphy_priv - return priv from wiphy Loading
include/net/genetlink.h +2 −13 Original line number Diff line number Diff line Loading @@ -68,26 +68,15 @@ struct genl_info { #endif }; #ifdef CONFIG_NET_NS static inline struct net *genl_info_net(struct genl_info *info) { return info->_net; return read_pnet(&info->_net); } static inline void genl_info_net_set(struct genl_info *info, struct net *net) { info->_net = net; write_pnet(&info->_net, net); } #else static inline struct net *genl_info_net(struct genl_info *info) { return &init_net; } static inline void genl_info_net_set(struct genl_info *info, struct net *net) { } #endif /** * struct genl_ops - generic netlink operations Loading
include/net/netfilter/nf_conntrack.h +1 −5 Original line number Diff line number Diff line Loading @@ -152,11 +152,7 @@ extern struct net init_net; static inline struct net *nf_ct_net(const struct nf_conn *ct) { #ifdef CONFIG_NET_NS return ct->ct_net; #else return &init_net; #endif return read_pnet(&ct->ct_net); } /* Alter reply tuple (maybe alter helper). */ Loading
include/net/sock.h +2 −8 Original line number Diff line number Diff line Loading @@ -1724,19 +1724,13 @@ static inline void sk_eat_skb(struct sock *sk, struct sk_buff *skb, int copied_e static inline struct net *sock_net(const struct sock *sk) { #ifdef CONFIG_NET_NS return sk->sk_net; #else return &init_net; #endif return read_pnet(&sk->sk_net); } static inline void sock_net_set(struct sock *sk, struct net *net) { #ifdef CONFIG_NET_NS sk->sk_net = net; #endif write_pnet(&sk->sk_net, net); } /* Loading