diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-06-01 02:51:19 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-06-02 08:16:23 -0400 |
commit | c2d9ba9bce8d7323ca96f239e1f505c14d6244fb (patch) | |
tree | 7a184eefa2e48e6aa15cdf3aefb6ccf2fb834320 /include/linux/netdevice.h | |
parent | c6b20d941b08941bece53bc3d857beb1fb25fffc (diff) |
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/linux/netdevice.h')
-rw-r--r-- | include/linux/netdevice.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index a24916156f4e..bd6b75317d5f 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -1087,11 +1087,7 @@ static inline void netdev_for_each_tx_queue(struct net_device *dev, | |||
1087 | static inline | 1087 | static inline |
1088 | struct net *dev_net(const struct net_device *dev) | 1088 | struct net *dev_net(const struct net_device *dev) |
1089 | { | 1089 | { |
1090 | #ifdef CONFIG_NET_NS | 1090 | return read_pnet(&dev->nd_net); |
1091 | return dev->nd_net; | ||
1092 | #else | ||
1093 | return &init_net; | ||
1094 | #endif | ||
1095 | } | 1091 | } |
1096 | 1092 | ||
1097 | static inline | 1093 | static inline |