diff options
author | Pavel Emelyanov <xemul@openvz.org> | 2008-01-22 09:11:48 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:10:39 -0500 |
commit | 3140c25c82106645a6b1fc469dab7006a1d09fd0 (patch) | |
tree | cbf97e7138610c1f1f0ad4528d59b4bbd14039c7 /net/ipv4/ip_fragment.c | |
parent | 3b4bc4a2bfe80d01ebd4f2b6dcc58986c970ed16 (diff) |
[NETNS][FRAGS]: Make the LRU list per namespace.
The inet_frags.lru_list is used for evicting only, so we have
to make it per-namespace, to evict only those fragments, who's
namespace exceeded its high threshold, but not the whole hash.
Besides, this helps to avoid long loops in evictor.
The spinlock is not per-namespace because it protects the
hash table as well, which is global.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
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 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c index 00646ed451f5..29b4b0972e44 100644 --- a/net/ipv4/ip_fragment.c +++ b/net/ipv4/ip_fragment.c | |||
@@ -441,7 +441,7 @@ static int ip_frag_queue(struct ipq *qp, struct sk_buff *skb) | |||
441 | return ip_frag_reasm(qp, prev, dev); | 441 | return ip_frag_reasm(qp, prev, dev); |
442 | 442 | ||
443 | write_lock(&ip4_frags.lock); | 443 | write_lock(&ip4_frags.lock); |
444 | list_move_tail(&qp->q.lru_list, &ip4_frags.lru_list); | 444 | list_move_tail(&qp->q.lru_list, &qp->q.net->lru_list); |
445 | write_unlock(&ip4_frags.lock); | 445 | write_unlock(&ip4_frags.lock); |
446 | return -EINPROGRESS; | 446 | return -EINPROGRESS; |
447 | 447 | ||