diff options
author | Jesper Dangaard Brouer <brouer@redhat.com> | 2013-03-27 01:55:56 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-03-27 12:48:33 -0400 |
commit | 1b5ab0def4f6e42e8b8097c3b11d2e8d96baafec (patch) | |
tree | 7cdce8ba8eda1451847fead45108f4de39d5cec5 /net/ipv4/inet_fragment.c | |
parent | 68399ac37e571c2d695ea3b08aa82235874b5158 (diff) |
net: use the frag lru_lock to protect netns_frags.nqueues update
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>
Diffstat (limited to 'net/ipv4/inet_fragment.c')
-rw-r--r-- | net/ipv4/inet_fragment.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/net/ipv4/inet_fragment.c b/net/ipv4/inet_fragment.c index 8ba548a8efce..1206ca64b0ea 100644 --- a/net/ipv4/inet_fragment.c +++ b/net/ipv4/inet_fragment.c | |||
@@ -124,7 +124,6 @@ static inline void fq_unlink(struct inet_frag_queue *fq, struct inet_frags *f) | |||
124 | { | 124 | { |
125 | write_lock(&f->lock); | 125 | write_lock(&f->lock); |
126 | hlist_del(&fq->list); | 126 | hlist_del(&fq->list); |
127 | fq->net->nqueues--; | ||
128 | write_unlock(&f->lock); | 127 | write_unlock(&f->lock); |
129 | inet_frag_lru_del(fq); | 128 | inet_frag_lru_del(fq); |
130 | } | 129 | } |
@@ -260,7 +259,6 @@ static struct inet_frag_queue *inet_frag_intern(struct netns_frags *nf, | |||
260 | 259 | ||
261 | atomic_inc(&qp->refcnt); | 260 | atomic_inc(&qp->refcnt); |
262 | hlist_add_head(&qp->list, &f->hash[hash]); | 261 | hlist_add_head(&qp->list, &f->hash[hash]); |
263 | nf->nqueues++; | ||
264 | write_unlock(&f->lock); | 262 | write_unlock(&f->lock); |
265 | inet_frag_lru_add(nf, qp); | 263 | inet_frag_lru_add(nf, qp); |
266 | return qp; | 264 | return qp; |