summaryrefslogtreecommitdiffstats
path: root/net/ipv4/ip_fragment.c
diff options
context:
space:
mode:
authorJesper Dangaard Brouer <brouer@redhat.com>2013-01-29 00:45:51 +0100
committerDavid S. Miller <davem@davemloft.net>2013-01-29 19:36:24 +0100
commit3ef0eb0db4bf92c6d2510fe5c4dc51852746f206 (patch)
tree3f0d424f598a82eb17a5199d27fec9964513e16e /net/ipv4/ip_fragment.c
parentnet: use lib/percpu_counter API for fragmentation mem accounting (diff)
downloadlinux-3ef0eb0db4bf92c6d2510fe5c4dc51852746f206.tar.xz
linux-3ef0eb0db4bf92c6d2510fe5c4dc51852746f206.zip
net: frag, move LRU list maintenance outside of rwlock
Updating the fragmentation queues LRU (Least-Recently-Used) list, required taking the hash writer lock. However, the LRU list isn't tied to the hash at all, so we can use a separate lock for it. Original-idea-by: Florian Westphal <fw@strlen.de> Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ip_fragment.c')
-rw-r--r--net/ipv4/ip_fragment.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c
index 927fe58caf46..1211613c6c34 100644
--- a/net/ipv4/ip_fragment.c
+++ b/net/ipv4/ip_fragment.c
@@ -529,9 +529,7 @@ found:
qp->q.meat == qp->q.len)
return ip_frag_reasm(qp, prev, dev);
- write_lock(&ip4_frags.lock);
- list_move_tail(&qp->q.lru_list, &qp->q.net->lru_list);
- write_unlock(&ip4_frags.lock);
+ inet_frag_lru_move(&qp->q);
return -EINPROGRESS;
err: