X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=net%2Fipv4%2Finet_fragment.c;h=3b01959bf4bb0bbc208d8d564c8595c67eedd179;hb=8dd6e147b0c29723ec10d0e836c7f3466d61a19b;hp=bb075fc9a14f25169c175c7fcdcb86d56c709627;hpb=5c1f34c42d601908b6491ded11beab83ec9b5f8a;p=~andy%2Flinux diff --git a/net/ipv4/inet_fragment.c b/net/ipv4/inet_fragment.c index bb075fc9a14..3b01959bf4b 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) } work = frag_mem_limit(nf) - nf->low_thresh; - while (work > 0) { + while (work > 0 || force) { spin_lock(&nf->lru_lock); if (list_empty(&nf->lru_list)) { @@ -278,9 +278,10 @@ static struct inet_frag_queue *inet_frag_intern(struct netns_frags *nf, atomic_inc(&qp->refcnt); hlist_add_head(&qp->list, &hb->chain); + inet_frag_lru_add(nf, qp); spin_unlock(&hb->chain_lock); read_unlock(&f->lock); - inet_frag_lru_add(nf, qp); + return qp; }