aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/inet_fragment.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/inet_fragment.c')
-rw-r--r--net/ipv4/inet_fragment.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv4/inet_fragment.c b/net/ipv4/inet_fragment.c
index bb075fc9a14f..3b01959bf4bb 100644
--- a/net/ipv4/inet_fragment.c
+++ b/net/ipv4/inet_fragment.c
@@ -208,7 +208,7 @@ int inet_frag_evictor(struct netns_frags *nf, struct inet_frags *f, bool force)
208 } 208 }
209 209
210 work = frag_mem_limit(nf) - nf->low_thresh; 210 work = frag_mem_limit(nf) - nf->low_thresh;
211 while (work > 0) { 211 while (work > 0 || force) {
212 spin_lock(&nf->lru_lock); 212 spin_lock(&nf->lru_lock);
213 213
214 if (list_empty(&nf->lru_list)) { 214 if (list_empty(&nf->lru_list)) {
@@ -278,9 +278,10 @@ static struct inet_frag_queue *inet_frag_intern(struct netns_frags *nf,
278 278
279 atomic_inc(&qp->refcnt); 279 atomic_inc(&qp->refcnt);
280 hlist_add_head(&qp->list, &hb->chain); 280 hlist_add_head(&qp->list, &hb->chain);
281 inet_frag_lru_add(nf, qp);
281 spin_unlock(&hb->chain_lock); 282 spin_unlock(&hb->chain_lock);
282 read_unlock(&f->lock); 283 read_unlock(&f->lock);
283 inet_frag_lru_add(nf, qp); 284
284 return qp; 285 return qp;
285} 286}
286 287