aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2014-07-24 10:50:34 -0400
committerDavid S. Miller <davem@davemloft.net>2014-07-28 01:34:36 -0400
commit3fd588eb90bfbba17091381006ecafe29c45db4a (patch)
treebd13a7188e37d038ef4a6283a8ef594e59ad25ee /net/ipv4
parent434d305405ab86414f6ea3f261307d443a2c3506 (diff)
inet: frag: remove lru list
no longer used. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/inet_fragment.c12
-rw-r--r--net/ipv4/ip_fragment.c1
2 files changed, 2 insertions, 11 deletions
diff --git a/net/ipv4/inet_fragment.c b/net/ipv4/inet_fragment.c
index 231ca0b40811..198a5ed7a815 100644
--- a/net/ipv4/inet_fragment.c
+++ b/net/ipv4/inet_fragment.c
@@ -194,8 +194,6 @@ EXPORT_SYMBOL(inet_frags_init);
194void inet_frags_init_net(struct netns_frags *nf) 194void inet_frags_init_net(struct netns_frags *nf)
195{ 195{
196 init_frag_mem_limit(nf); 196 init_frag_mem_limit(nf);
197 INIT_LIST_HEAD(&nf->lru_list);
198 spin_lock_init(&nf->lru_lock);
199} 197}
200EXPORT_SYMBOL(inet_frags_init_net); 198EXPORT_SYMBOL(inet_frags_init_net);
201 199
@@ -237,7 +235,6 @@ static inline void fq_unlink(struct inet_frag_queue *fq, struct inet_frags *f)
237 spin_unlock(&hb->chain_lock); 235 spin_unlock(&hb->chain_lock);
238 236
239 read_unlock(&f->lock); 237 read_unlock(&f->lock);
240 inet_frag_lru_del(fq);
241} 238}
242 239
243void inet_frag_kill(struct inet_frag_queue *fq, struct inet_frags *f) 240void inet_frag_kill(struct inet_frag_queue *fq, struct inet_frags *f)
@@ -261,8 +258,7 @@ static inline void frag_kfree_skb(struct netns_frags *nf, struct inet_frags *f,
261 kfree_skb(skb); 258 kfree_skb(skb);
262} 259}
263 260
264void inet_frag_destroy(struct inet_frag_queue *q, struct inet_frags *f, 261void inet_frag_destroy(struct inet_frag_queue *q, struct inet_frags *f)
265 int *work)
266{ 262{
267 struct sk_buff *fp; 263 struct sk_buff *fp;
268 struct netns_frags *nf; 264 struct netns_frags *nf;
@@ -282,14 +278,11 @@ void inet_frag_destroy(struct inet_frag_queue *q, struct inet_frags *f,
282 fp = xp; 278 fp = xp;
283 } 279 }
284 sum = sum_truesize + f->qsize; 280 sum = sum_truesize + f->qsize;
285 if (work)
286 *work -= sum;
287 sub_frag_mem_limit(q, sum); 281 sub_frag_mem_limit(q, sum);
288 282
289 if (f->destructor) 283 if (f->destructor)
290 f->destructor(q); 284 f->destructor(q);
291 kfree(q); 285 kfree(q);
292
293} 286}
294EXPORT_SYMBOL(inet_frag_destroy); 287EXPORT_SYMBOL(inet_frag_destroy);
295 288
@@ -333,7 +326,7 @@ static struct inet_frag_queue *inet_frag_intern(struct netns_frags *nf,
333 326
334 atomic_inc(&qp->refcnt); 327 atomic_inc(&qp->refcnt);
335 hlist_add_head(&qp->list, &hb->chain); 328 hlist_add_head(&qp->list, &hb->chain);
336 inet_frag_lru_add(nf, qp); 329
337 spin_unlock(&hb->chain_lock); 330 spin_unlock(&hb->chain_lock);
338 read_unlock(&f->lock); 331 read_unlock(&f->lock);
339 332
@@ -361,7 +354,6 @@ static struct inet_frag_queue *inet_frag_alloc(struct netns_frags *nf,
361 setup_timer(&q->timer, f->frag_expire, (unsigned long)q); 354 setup_timer(&q->timer, f->frag_expire, (unsigned long)q);
362 spin_lock_init(&q->lock); 355 spin_lock_init(&q->lock);
363 atomic_set(&q->refcnt, 1); 356 atomic_set(&q->refcnt, 1);
364 INIT_LIST_HEAD(&q->lru_list);
365 357
366 return q; 358 return q;
367} 359}
diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c
index 1f42c2e3966b..8fbeee495037 100644
--- a/net/ipv4/ip_fragment.c
+++ b/net/ipv4/ip_fragment.c
@@ -489,7 +489,6 @@ found:
489 } 489 }
490 490
491 skb_dst_drop(skb); 491 skb_dst_drop(skb);
492 inet_frag_lru_move(&qp->q);
493 return -EINPROGRESS; 492 return -EINPROGRESS;
494 493
495err: 494err: