diff options
Diffstat (limited to 'net/openvswitch/datapath.c')
-rw-r--r-- | net/openvswitch/datapath.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c index 9dc537df46c4..e87a26506dba 100644 --- a/net/openvswitch/datapath.c +++ b/net/openvswitch/datapath.c | |||
@@ -158,11 +158,10 @@ static struct hlist_head *vport_hash_bucket(const struct datapath *dp, | |||
158 | struct vport *ovs_lookup_vport(const struct datapath *dp, u16 port_no) | 158 | struct vport *ovs_lookup_vport(const struct datapath *dp, u16 port_no) |
159 | { | 159 | { |
160 | struct vport *vport; | 160 | struct vport *vport; |
161 | struct hlist_node *n; | ||
162 | struct hlist_head *head; | 161 | struct hlist_head *head; |
163 | 162 | ||
164 | head = vport_hash_bucket(dp, port_no); | 163 | head = vport_hash_bucket(dp, port_no); |
165 | hlist_for_each_entry_rcu(vport, n, head, dp_hash_node) { | 164 | hlist_for_each_entry_rcu(vport, head, dp_hash_node) { |
166 | if (vport->port_no == port_no) | 165 | if (vport->port_no == port_no) |
167 | return vport; | 166 | return vport; |
168 | } | 167 | } |
@@ -1386,9 +1385,9 @@ static void __dp_destroy(struct datapath *dp) | |||
1386 | 1385 | ||
1387 | for (i = 0; i < DP_VPORT_HASH_BUCKETS; i++) { | 1386 | for (i = 0; i < DP_VPORT_HASH_BUCKETS; i++) { |
1388 | struct vport *vport; | 1387 | struct vport *vport; |
1389 | struct hlist_node *node, *n; | 1388 | struct hlist_node *n; |
1390 | 1389 | ||
1391 | hlist_for_each_entry_safe(vport, node, n, &dp->ports[i], dp_hash_node) | 1390 | hlist_for_each_entry_safe(vport, n, &dp->ports[i], dp_hash_node) |
1392 | if (vport->port_no != OVSP_LOCAL) | 1391 | if (vport->port_no != OVSP_LOCAL) |
1393 | ovs_dp_detach_port(vport); | 1392 | ovs_dp_detach_port(vport); |
1394 | } | 1393 | } |
@@ -1825,10 +1824,9 @@ static int ovs_vport_cmd_dump(struct sk_buff *skb, struct netlink_callback *cb) | |||
1825 | rcu_read_lock(); | 1824 | rcu_read_lock(); |
1826 | for (i = bucket; i < DP_VPORT_HASH_BUCKETS; i++) { | 1825 | for (i = bucket; i < DP_VPORT_HASH_BUCKETS; i++) { |
1827 | struct vport *vport; | 1826 | struct vport *vport; |
1828 | struct hlist_node *n; | ||
1829 | 1827 | ||
1830 | j = 0; | 1828 | j = 0; |
1831 | hlist_for_each_entry_rcu(vport, n, &dp->ports[i], dp_hash_node) { | 1829 | hlist_for_each_entry_rcu(vport, &dp->ports[i], dp_hash_node) { |
1832 | if (j >= skip && | 1830 | if (j >= skip && |
1833 | ovs_vport_cmd_fill_info(vport, skb, | 1831 | ovs_vport_cmd_fill_info(vport, skb, |
1834 | NETLINK_CB(cb->skb).portid, | 1832 | NETLINK_CB(cb->skb).portid, |