diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/netdevice.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 8b266390b9e2..61425d0c6123 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -1114,6 +1114,16 @@ static inline struct net_device *next_net_device(struct net_device *dev) | |||
1114 | return lh == &net->dev_base_head ? NULL : net_device_entry(lh); | 1114 | return lh == &net->dev_base_head ? NULL : net_device_entry(lh); |
1115 | } | 1115 | } |
1116 | 1116 | ||
1117 | static inline struct net_device *next_net_device_rcu(struct net_device *dev) | ||
1118 | { | ||
1119 | struct list_head *lh; | ||
1120 | struct net *net; | ||
1121 | |||
1122 | net = dev_net(dev); | ||
1123 | lh = rcu_dereference(dev->dev_list.next); | ||
1124 | return lh == &net->dev_base_head ? NULL : net_device_entry(lh); | ||
1125 | } | ||
1126 | |||
1117 | static inline struct net_device *first_net_device(struct net *net) | 1127 | static inline struct net_device *first_net_device(struct net *net) |
1118 | { | 1128 | { |
1119 | return list_empty(&net->dev_base_head) ? NULL : | 1129 | return list_empty(&net->dev_base_head) ? NULL : |