diff options
Diffstat (limited to 'drivers/net/tun.c')
-rw-r--r-- | drivers/net/tun.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/net/tun.c b/drivers/net/tun.c index b6f45c5d84d5..2c6a22e278ea 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c | |||
@@ -197,9 +197,8 @@ static inline u32 tun_hashfn(u32 rxhash) | |||
197 | static struct tun_flow_entry *tun_flow_find(struct hlist_head *head, u32 rxhash) | 197 | static struct tun_flow_entry *tun_flow_find(struct hlist_head *head, u32 rxhash) |
198 | { | 198 | { |
199 | struct tun_flow_entry *e; | 199 | struct tun_flow_entry *e; |
200 | struct hlist_node *n; | ||
201 | 200 | ||
202 | hlist_for_each_entry_rcu(e, n, head, hash_link) { | 201 | hlist_for_each_entry_rcu(e, head, hash_link) { |
203 | if (e->rxhash == rxhash) | 202 | if (e->rxhash == rxhash) |
204 | return e; | 203 | return e; |
205 | } | 204 | } |
@@ -241,9 +240,9 @@ static void tun_flow_flush(struct tun_struct *tun) | |||
241 | spin_lock_bh(&tun->lock); | 240 | spin_lock_bh(&tun->lock); |
242 | for (i = 0; i < TUN_NUM_FLOW_ENTRIES; i++) { | 241 | for (i = 0; i < TUN_NUM_FLOW_ENTRIES; i++) { |
243 | struct tun_flow_entry *e; | 242 | struct tun_flow_entry *e; |
244 | struct hlist_node *h, *n; | 243 | struct hlist_node *n; |
245 | 244 | ||
246 | hlist_for_each_entry_safe(e, h, n, &tun->flows[i], hash_link) | 245 | hlist_for_each_entry_safe(e, n, &tun->flows[i], hash_link) |
247 | tun_flow_delete(tun, e); | 246 | tun_flow_delete(tun, e); |
248 | } | 247 | } |
249 | spin_unlock_bh(&tun->lock); | 248 | spin_unlock_bh(&tun->lock); |
@@ -256,9 +255,9 @@ static void tun_flow_delete_by_queue(struct tun_struct *tun, u16 queue_index) | |||
256 | spin_lock_bh(&tun->lock); | 255 | spin_lock_bh(&tun->lock); |
257 | for (i = 0; i < TUN_NUM_FLOW_ENTRIES; i++) { | 256 | for (i = 0; i < TUN_NUM_FLOW_ENTRIES; i++) { |
258 | struct tun_flow_entry *e; | 257 | struct tun_flow_entry *e; |
259 | struct hlist_node *h, *n; | 258 | struct hlist_node *n; |
260 | 259 | ||
261 | hlist_for_each_entry_safe(e, h, n, &tun->flows[i], hash_link) { | 260 | hlist_for_each_entry_safe(e, n, &tun->flows[i], hash_link) { |
262 | if (e->queue_index == queue_index) | 261 | if (e->queue_index == queue_index) |
263 | tun_flow_delete(tun, e); | 262 | tun_flow_delete(tun, e); |
264 | } | 263 | } |
@@ -279,9 +278,9 @@ static void tun_flow_cleanup(unsigned long data) | |||
279 | spin_lock_bh(&tun->lock); | 278 | spin_lock_bh(&tun->lock); |
280 | for (i = 0; i < TUN_NUM_FLOW_ENTRIES; i++) { | 279 | for (i = 0; i < TUN_NUM_FLOW_ENTRIES; i++) { |
281 | struct tun_flow_entry *e; | 280 | struct tun_flow_entry *e; |
282 | struct hlist_node *h, *n; | 281 | struct hlist_node *n; |
283 | 282 | ||
284 | hlist_for_each_entry_safe(e, h, n, &tun->flows[i], hash_link) { | 283 | hlist_for_each_entry_safe(e, n, &tun->flows[i], hash_link) { |
285 | unsigned long this_timer; | 284 | unsigned long this_timer; |
286 | count++; | 285 | count++; |
287 | this_timer = e->updated + delay; | 286 | this_timer = e->updated + delay; |