aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJesper Dangaard Brouer <brouer@redhat.com>2013-03-27 01:55:56 -0400
committerDavid S. Miller <davem@davemloft.net>2013-03-27 12:48:33 -0400
commit1b5ab0def4f6e42e8b8097c3b11d2e8d96baafec (patch)
tree7cdce8ba8eda1451847fead45108f4de39d5cec5 /include
parent68399ac37e571c2d695ea3b08aa82235874b5158 (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 'include')
-rw-r--r--include/net/inet_frag.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/inet_frag.h b/include/net/inet_frag.h
index 64b4e7d23b8a..7cac9c5789b5 100644
--- a/include/net/inet_frag.h
+++ b/include/net/inet_frag.h
@@ -143,6 +143,7 @@ static inline void inet_frag_lru_del(struct inet_frag_queue *q)
143{ 143{
144 spin_lock(&q->net->lru_lock); 144 spin_lock(&q->net->lru_lock);
145 list_del(&q->lru_list); 145 list_del(&q->lru_list);
146 q->net->nqueues--;
146 spin_unlock(&q->net->lru_lock); 147 spin_unlock(&q->net->lru_lock);
147} 148}
148 149
@@ -151,6 +152,7 @@ static inline void inet_frag_lru_add(struct netns_frags *nf,
151{ 152{
152 spin_lock(&nf->lru_lock); 153 spin_lock(&nf->lru_lock);
153 list_add_tail(&q->lru_list, &nf->lru_list); 154 list_add_tail(&q->lru_list, &nf->lru_list);
155 q->net->nqueues++;
154 spin_unlock(&nf->lru_lock); 156 spin_unlock(&nf->lru_lock);
155} 157}
156 158