diff options
Diffstat (limited to 'net/ipv4/inet_fragment.c')
-rw-r--r-- | net/ipv4/inet_fragment.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/net/ipv4/inet_fragment.c b/net/ipv4/inet_fragment.c index 158c5f60d023..4fec0b911f85 100644 --- a/net/ipv4/inet_fragment.c +++ b/net/ipv4/inet_fragment.c | |||
@@ -63,7 +63,6 @@ void inet_frags_init(struct inet_frags *f) | |||
63 | f->rnd = (u32) ((num_physpages ^ (num_physpages>>7)) ^ | 63 | f->rnd = (u32) ((num_physpages ^ (num_physpages>>7)) ^ |
64 | (jiffies ^ (jiffies >> 6))); | 64 | (jiffies ^ (jiffies >> 6))); |
65 | 65 | ||
66 | f->nqueues = 0; | ||
67 | atomic_set(&f->mem, 0); | 66 | atomic_set(&f->mem, 0); |
68 | 67 | ||
69 | setup_timer(&f->secret_timer, inet_frag_secret_rebuild, | 68 | setup_timer(&f->secret_timer, inet_frag_secret_rebuild, |
@@ -73,6 +72,12 @@ void inet_frags_init(struct inet_frags *f) | |||
73 | } | 72 | } |
74 | EXPORT_SYMBOL(inet_frags_init); | 73 | EXPORT_SYMBOL(inet_frags_init); |
75 | 74 | ||
75 | void inet_frags_init_net(struct netns_frags *nf) | ||
76 | { | ||
77 | nf->nqueues = 0; | ||
78 | } | ||
79 | EXPORT_SYMBOL(inet_frags_init_net); | ||
80 | |||
76 | void inet_frags_fini(struct inet_frags *f) | 81 | void inet_frags_fini(struct inet_frags *f) |
77 | { | 82 | { |
78 | del_timer(&f->secret_timer); | 83 | del_timer(&f->secret_timer); |
@@ -84,7 +89,7 @@ static inline void fq_unlink(struct inet_frag_queue *fq, struct inet_frags *f) | |||
84 | write_lock(&f->lock); | 89 | write_lock(&f->lock); |
85 | hlist_del(&fq->list); | 90 | hlist_del(&fq->list); |
86 | list_del(&fq->lru_list); | 91 | list_del(&fq->lru_list); |
87 | f->nqueues--; | 92 | fq->net->nqueues--; |
88 | write_unlock(&f->lock); | 93 | write_unlock(&f->lock); |
89 | } | 94 | } |
90 | 95 | ||
@@ -206,7 +211,7 @@ static struct inet_frag_queue *inet_frag_intern(struct netns_frags *nf, | |||
206 | atomic_inc(&qp->refcnt); | 211 | atomic_inc(&qp->refcnt); |
207 | hlist_add_head(&qp->list, &f->hash[hash]); | 212 | hlist_add_head(&qp->list, &f->hash[hash]); |
208 | list_add_tail(&qp->lru_list, &f->lru_list); | 213 | list_add_tail(&qp->lru_list, &f->lru_list); |
209 | f->nqueues++; | 214 | nf->nqueues++; |
210 | write_unlock(&f->lock); | 215 | write_unlock(&f->lock); |
211 | return qp; | 216 | return qp; |
212 | } | 217 | } |