From 2e32b7138971c922bef45cb757119513d3090817 Mon Sep 17 00:00:00 2001 From: Pavel Emelyanov Date: Sat, 5 Jul 2008 21:19:20 -0700 Subject: [PATCH] --- yaml --- r: 103250 b: refs/heads/master c: 235b9f7ac53489011d32efeb89e12e308fdd2c64 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/net/udp.h | 2 +- trunk/net/ipv6/udp.c | 11 +++++++---- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 572e927908d4..f8c2e8b6e648 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0283328e2360bbf3081e97f1b720dd4c4dbae111 +refs/heads/master: 235b9f7ac53489011d32efeb89e12e308fdd2c64 diff --git a/trunk/include/net/udp.h b/trunk/include/net/udp.h index 7b18cfb2fe0b..bb5b9ec85638 100644 --- a/trunk/include/net/udp.h +++ b/trunk/include/net/udp.h @@ -168,7 +168,7 @@ DECLARE_SNMP_STAT(struct udp_mib, udplite_stats_in6); #define UDP6_INC_STATS_BH(field, is_udplite) do { \ if (is_udplite) SNMP_INC_STATS_BH(udplite_stats_in6, field); \ else SNMP_INC_STATS_BH(udp_stats_in6, field); } while(0) -#define UDP6_INC_STATS_USER(field, is_udplite) do { \ +#define UDP6_INC_STATS_USER(net, field, is_udplite) do { (void)net; \ if (is_udplite) SNMP_INC_STATS_USER(udplite_stats_in6, field); \ else SNMP_INC_STATS_USER(udp_stats_in6, field); } while(0) diff --git a/trunk/net/ipv6/udp.c b/trunk/net/ipv6/udp.c index f91e1df0d25e..833f715e4bff 100644 --- a/trunk/net/ipv6/udp.c +++ b/trunk/net/ipv6/udp.c @@ -166,7 +166,8 @@ int udpv6_recvmsg(struct kiocb *iocb, struct sock *sk, goto out_free; if (!peeked) - UDP6_INC_STATS_USER(UDP_MIB_INDATAGRAMS, is_udplite); + UDP6_INC_STATS_USER(sock_net(sk), + UDP_MIB_INDATAGRAMS, is_udplite); sock_recv_timestamp(msg, sk, skb); @@ -213,7 +214,7 @@ int udpv6_recvmsg(struct kiocb *iocb, struct sock *sk, csum_copy_err: lock_sock(sk); if (!skb_kill_datagram(sk, skb, flags)) - UDP6_INC_STATS_USER(UDP_MIB_INERRORS, is_udplite); + UDP6_INC_STATS_USER(sock_net(sk), UDP_MIB_INERRORS, is_udplite); release_sock(sk); if (flags & MSG_DONTWAIT) @@ -591,7 +592,8 @@ static int udp_v6_push_pending_frames(struct sock *sk) up->len = 0; up->pending = 0; if (!err) - UDP6_INC_STATS_USER(UDP_MIB_OUTDATAGRAMS, is_udplite); + UDP6_INC_STATS_USER(sock_net(sk), + UDP_MIB_OUTDATAGRAMS, is_udplite); return err; } @@ -873,7 +875,8 @@ int udpv6_sendmsg(struct kiocb *iocb, struct sock *sk, * seems like overkill. */ if (err == -ENOBUFS || test_bit(SOCK_NOSPACE, &sk->sk_socket->flags)) { - UDP6_INC_STATS_USER(UDP_MIB_SNDBUFERRORS, is_udplite); + UDP6_INC_STATS_USER(sock_net(sk), + UDP_MIB_SNDBUFERRORS, is_udplite); } return err;