diff options
author | Pavel Emelyanov <xemul@openvz.org> | 2008-07-06 00:18:07 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-06 00:18:07 -0400 |
commit | 629ca23c331ec75ac87b016debbb3c4d2fe62650 (patch) | |
tree | 491b70f7b51ac43cd706564f741366f9f05ccf13 /net/ipv4/udp.c | |
parent | 4ce2417bfb3c7b1c5ed449782f4d86bafd7f1b69 (diff) |
MIB: add struct net to UDP_INC_STATS_USER
Nothing special - all the places already have a struct sock
at hands, so use the sock_net() net.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Acked-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/udp.c')
-rw-r--r-- | net/ipv4/udp.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 3bbf6fb6e4f5..c97da5394d70 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c | |||
@@ -526,7 +526,8 @@ out: | |||
526 | up->len = 0; | 526 | up->len = 0; |
527 | up->pending = 0; | 527 | up->pending = 0; |
528 | if (!err) | 528 | if (!err) |
529 | UDP_INC_STATS_USER(UDP_MIB_OUTDATAGRAMS, is_udplite); | 529 | UDP_INC_STATS_USER(sock_net(sk), |
530 | UDP_MIB_OUTDATAGRAMS, is_udplite); | ||
530 | return err; | 531 | return err; |
531 | } | 532 | } |
532 | 533 | ||
@@ -725,7 +726,8 @@ out: | |||
725 | * seems like overkill. | 726 | * seems like overkill. |
726 | */ | 727 | */ |
727 | if (err == -ENOBUFS || test_bit(SOCK_NOSPACE, &sk->sk_socket->flags)) { | 728 | if (err == -ENOBUFS || test_bit(SOCK_NOSPACE, &sk->sk_socket->flags)) { |
728 | UDP_INC_STATS_USER(UDP_MIB_SNDBUFERRORS, is_udplite); | 729 | UDP_INC_STATS_USER(sock_net(sk), |
730 | UDP_MIB_SNDBUFERRORS, is_udplite); | ||
729 | } | 731 | } |
730 | return err; | 732 | return err; |
731 | 733 | ||
@@ -888,7 +890,8 @@ try_again: | |||
888 | goto out_free; | 890 | goto out_free; |
889 | 891 | ||
890 | if (!peeked) | 892 | if (!peeked) |
891 | UDP_INC_STATS_USER(UDP_MIB_INDATAGRAMS, is_udplite); | 893 | UDP_INC_STATS_USER(sock_net(sk), |
894 | UDP_MIB_INDATAGRAMS, is_udplite); | ||
892 | 895 | ||
893 | sock_recv_timestamp(msg, sk, skb); | 896 | sock_recv_timestamp(msg, sk, skb); |
894 | 897 | ||
@@ -917,7 +920,7 @@ out: | |||
917 | csum_copy_err: | 920 | csum_copy_err: |
918 | lock_sock(sk); | 921 | lock_sock(sk); |
919 | if (!skb_kill_datagram(sk, skb, flags)) | 922 | if (!skb_kill_datagram(sk, skb, flags)) |
920 | UDP_INC_STATS_USER(UDP_MIB_INERRORS, is_udplite); | 923 | UDP_INC_STATS_USER(sock_net(sk), UDP_MIB_INERRORS, is_udplite); |
921 | release_sock(sk); | 924 | release_sock(sk); |
922 | 925 | ||
923 | if (noblock) | 926 | if (noblock) |