diff options
author | Jesper Dangaard Brouer <brouer@redhat.com> | 2013-01-28 23:45:51 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-01-29 13:36:24 -0500 |
commit | 3ef0eb0db4bf92c6d2510fe5c4dc51852746f206 (patch) | |
tree | 3f0d424f598a82eb17a5199d27fec9964513e16e /net/ipv4/ip_fragment.c | |
parent | 6d7b857d541ecd1d9bd997c97242d4ef94b19de2 (diff) | |
download | linux-3ef0eb0db4bf92c6d2510fe5c4dc51852746f206.tar.gz linux-3ef0eb0db4bf92c6d2510fe5c4dc51852746f206.tar.bz2 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: |