Move the protection of netns_frags.nqueues updates under the LRU_lock,
instead of the write lock. As they are located on the same cacheline,
and this is also needed when transitioning to use per hash bucket locking.
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
{
spin_lock(&q->net->lru_lock);
list_del(&q->lru_list);
+ q->net->nqueues--;
spin_unlock(&q->net->lru_lock);
}
{
spin_lock(&nf->lru_lock);
list_add_tail(&q->lru_list, &nf->lru_list);
+ q->net->nqueues++;
spin_unlock(&nf->lru_lock);
}
{
write_lock(&f->lock);
hlist_del(&fq->list);
- fq->net->nqueues--;
write_unlock(&f->lock);
inet_frag_lru_del(fq);
}
atomic_inc(&qp->refcnt);
hlist_add_head(&qp->list, &f->hash[hash]);
- nf->nqueues++;
write_unlock(&f->lock);
inet_frag_lru_add(nf, qp);
return qp;