mib: add net to TCP_DEC_STATS
authorPavel Emelyanov <xemul@openvz.org>
Thu, 17 Jul 2008 03:22:46 +0000 (20:22 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 17 Jul 2008 03:22:46 +0000 (20:22 -0700)
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/tcp.h
net/ipv4/tcp.c

index 8a2cd076be8221b2616ec934bd336ea76132081a..92d87691aa61f34c01fd0361ded545577071dd2d 100644 (file)
@@ -268,7 +268,7 @@ extern struct proto tcp_prot;
 DECLARE_SNMP_STAT(struct tcp_mib, tcp_statistics);
 #define TCP_INC_STATS(net, field)      do { (void)net; SNMP_INC_STATS(tcp_statistics, field); } while (0)
 #define TCP_INC_STATS_BH(net, field)   do { (void)net; SNMP_INC_STATS_BH(tcp_statistics, field); } while (0)
-#define TCP_DEC_STATS(field)           SNMP_DEC_STATS(tcp_statistics, field)
+#define TCP_DEC_STATS(net, field)      do { (void)net; SNMP_DEC_STATS(tcp_statistics, field); } while (0)
 #define TCP_ADD_STATS_USER(field, val) SNMP_ADD_STATS_USER(tcp_statistics, field, val)
 
 extern void                    tcp_v4_err(struct sk_buff *skb, u32);
index f742f84026b5f73d22b1c4542b2862b5b43798c4..525dcf5341532ffdaa676cf9939070b29fdbf43b 100644 (file)
@@ -1682,7 +1682,7 @@ void tcp_set_state(struct sock *sk, int state)
                /* fall through */
        default:
                if (oldstate==TCP_ESTABLISHED)
-                       TCP_DEC_STATS(TCP_MIB_CURRESTAB);
+                       TCP_DEC_STATS(sock_net(sk), TCP_MIB_CURRESTAB);
        }
 
        /* Change state AFTER socket is unhashed to avoid closed