diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-06-01 06:51:19 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-06-02 05:16:23 -0700 |
commit | c2d9ba9bce8d7323ca96f239e1f505c14d6244fb (patch) | |
tree | 7a184eefa2e48e6aa15cdf3aefb6ccf2fb834320 /include/net/genetlink.h | |
parent | c6b20d941b08941bece53bc3d857beb1fb25fffc (diff) | |
download | linux-stable-c2d9ba9bce8d7323ca96f239e1f505c14d6244fb.tar.gz linux-stable-c2d9ba9bce8d7323ca96f239e1f505c14d6244fb.tar.bz2 linux-stable-c2d9ba9bce8d7323ca96f239e1f505c14d6244fb.zip |
net: CONFIG_NET_NS reduction
Use read_pnet() and write_pnet() to reduce number of ifdef CONFIG_NET_NS
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/genetlink.h')
-rw-r--r-- | include/net/genetlink.h | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/include/net/genetlink.h b/include/net/genetlink.h index eb551baafc04..f7dcd2c70412 100644 --- a/include/net/genetlink.h +++ b/include/net/genetlink.h @@ -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 |