diff options
Diffstat (limited to 'net/ipv4/inet_fragment.c')
-rw-r--r-- | net/ipv4/inet_fragment.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/net/ipv4/inet_fragment.c b/net/ipv4/inet_fragment.c index 2e453bde6992..245ae078a07f 100644 --- a/net/ipv4/inet_fragment.c +++ b/net/ipv4/inet_fragment.c | |||
@@ -33,9 +33,9 @@ static void inet_frag_secret_rebuild(unsigned long dummy) | |||
33 | get_random_bytes(&f->rnd, sizeof(u32)); | 33 | get_random_bytes(&f->rnd, sizeof(u32)); |
34 | for (i = 0; i < INETFRAGS_HASHSZ; i++) { | 34 | for (i = 0; i < INETFRAGS_HASHSZ; i++) { |
35 | struct inet_frag_queue *q; | 35 | struct inet_frag_queue *q; |
36 | struct hlist_node *p, *n; | 36 | struct hlist_node *n; |
37 | 37 | ||
38 | hlist_for_each_entry_safe(q, p, n, &f->hash[i], list) { | 38 | hlist_for_each_entry_safe(q, n, &f->hash[i], list) { |
39 | unsigned int hval = f->hashfn(q); | 39 | unsigned int hval = f->hashfn(q); |
40 | 40 | ||
41 | if (hval != i) { | 41 | if (hval != i) { |
@@ -203,7 +203,6 @@ static struct inet_frag_queue *inet_frag_intern(struct netns_frags *nf, | |||
203 | { | 203 | { |
204 | struct inet_frag_queue *qp; | 204 | struct inet_frag_queue *qp; |
205 | #ifdef CONFIG_SMP | 205 | #ifdef CONFIG_SMP |
206 | struct hlist_node *n; | ||
207 | #endif | 206 | #endif |
208 | unsigned int hash; | 207 | unsigned int hash; |
209 | 208 | ||
@@ -219,7 +218,7 @@ static struct inet_frag_queue *inet_frag_intern(struct netns_frags *nf, | |||
219 | * such entry could be created on other cpu, while we | 218 | * such entry could be created on other cpu, while we |
220 | * promoted read lock to write lock. | 219 | * promoted read lock to write lock. |
221 | */ | 220 | */ |
222 | hlist_for_each_entry(qp, n, &f->hash[hash], list) { | 221 | hlist_for_each_entry(qp, &f->hash[hash], list) { |
223 | if (qp->net == nf && f->match(qp, arg)) { | 222 | if (qp->net == nf && f->match(qp, arg)) { |
224 | atomic_inc(&qp->refcnt); | 223 | atomic_inc(&qp->refcnt); |
225 | write_unlock(&f->lock); | 224 | write_unlock(&f->lock); |
@@ -278,9 +277,8 @@ struct inet_frag_queue *inet_frag_find(struct netns_frags *nf, | |||
278 | __releases(&f->lock) | 277 | __releases(&f->lock) |
279 | { | 278 | { |
280 | struct inet_frag_queue *q; | 279 | struct inet_frag_queue *q; |
281 | struct hlist_node *n; | ||
282 | 280 | ||
283 | hlist_for_each_entry(q, n, &f->hash[hash], list) { | 281 | hlist_for_each_entry(q, &f->hash[hash], list) { |
284 | if (q->net == nf && f->match(q, key)) { | 282 | if (q->net == nf && f->match(q, key)) { |
285 | atomic_inc(&q->refcnt); | 283 | atomic_inc(&q->refcnt); |
286 | read_unlock(&f->lock); | 284 | read_unlock(&f->lock); |