diff options
author | Jesper Dangaard Brouer <brouer@redhat.com> | 2013-01-29 00:45:51 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-01-29 19:36:24 +0100 |
commit | 3ef0eb0db4bf92c6d2510fe5c4dc51852746f206 (patch) | |
tree | 3f0d424f598a82eb17a5199d27fec9964513e16e /net/ipv4/ip_fragment.c | |
parent | net: use lib/percpu_counter API for fragmentation mem accounting (diff) | |
download | linux-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.c | 4 |
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: |