aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2010-06-01 02:51:19 -0400
committerDavid S. Miller <davem@davemloft.net>2010-06-02 08:16:23 -0400
commitc2d9ba9bce8d7323ca96f239e1f505c14d6244fb (patch)
tree7a184eefa2e48e6aa15cdf3aefb6ccf2fb834320 /include/linux/netdevice.h
parentc6b20d941b08941bece53bc3d857beb1fb25fffc (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.h6
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,
1087static inline 1087static inline
1088struct net *dev_net(const struct net_device *dev) 1088struct 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
1097static inline 1093static inline