diff options
Diffstat (limited to 'drivers/net/vxlan.c')
-rw-r--r-- | drivers/net/vxlan.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index f736823f8437..f10e58ac9c1b 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c | |||
@@ -145,9 +145,8 @@ static inline struct hlist_head *vni_head(struct net *net, u32 id) | |||
145 | static struct vxlan_dev *vxlan_find_vni(struct net *net, u32 id) | 145 | static struct vxlan_dev *vxlan_find_vni(struct net *net, u32 id) |
146 | { | 146 | { |
147 | struct vxlan_dev *vxlan; | 147 | struct vxlan_dev *vxlan; |
148 | struct hlist_node *node; | ||
149 | 148 | ||
150 | hlist_for_each_entry_rcu(vxlan, node, vni_head(net, id), hlist) { | 149 | hlist_for_each_entry_rcu(vxlan, vni_head(net, id), hlist) { |
151 | if (vxlan->vni == id) | 150 | if (vxlan->vni == id) |
152 | return vxlan; | 151 | return vxlan; |
153 | } | 152 | } |
@@ -292,9 +291,8 @@ static struct vxlan_fdb *vxlan_find_mac(struct vxlan_dev *vxlan, | |||
292 | { | 291 | { |
293 | struct hlist_head *head = vxlan_fdb_head(vxlan, mac); | 292 | struct hlist_head *head = vxlan_fdb_head(vxlan, mac); |
294 | struct vxlan_fdb *f; | 293 | struct vxlan_fdb *f; |
295 | struct hlist_node *node; | ||
296 | 294 | ||
297 | hlist_for_each_entry_rcu(f, node, head, hlist) { | 295 | hlist_for_each_entry_rcu(f, head, hlist) { |
298 | if (compare_ether_addr(mac, f->eth_addr) == 0) | 296 | if (compare_ether_addr(mac, f->eth_addr) == 0) |
299 | return f; | 297 | return f; |
300 | } | 298 | } |
@@ -422,10 +420,9 @@ static int vxlan_fdb_dump(struct sk_buff *skb, struct netlink_callback *cb, | |||
422 | 420 | ||
423 | for (h = 0; h < FDB_HASH_SIZE; ++h) { | 421 | for (h = 0; h < FDB_HASH_SIZE; ++h) { |
424 | struct vxlan_fdb *f; | 422 | struct vxlan_fdb *f; |
425 | struct hlist_node *n; | ||
426 | int err; | 423 | int err; |
427 | 424 | ||
428 | hlist_for_each_entry_rcu(f, n, &vxlan->fdb_head[h], hlist) { | 425 | hlist_for_each_entry_rcu(f, &vxlan->fdb_head[h], hlist) { |
429 | if (idx < cb->args[0]) | 426 | if (idx < cb->args[0]) |
430 | goto skip; | 427 | goto skip; |
431 | 428 | ||
@@ -483,11 +480,10 @@ static bool vxlan_group_used(struct vxlan_net *vn, | |||
483 | const struct vxlan_dev *this) | 480 | const struct vxlan_dev *this) |
484 | { | 481 | { |
485 | const struct vxlan_dev *vxlan; | 482 | const struct vxlan_dev *vxlan; |
486 | struct hlist_node *node; | ||
487 | unsigned h; | 483 | unsigned h; |
488 | 484 | ||
489 | for (h = 0; h < VNI_HASH_SIZE; ++h) | 485 | for (h = 0; h < VNI_HASH_SIZE; ++h) |
490 | hlist_for_each_entry(vxlan, node, &vn->vni_list[h], hlist) { | 486 | hlist_for_each_entry(vxlan, &vn->vni_list[h], hlist) { |
491 | if (vxlan == this) | 487 | if (vxlan == this) |
492 | continue; | 488 | continue; |
493 | 489 | ||