diff options
-rw-r--r-- | include/net/ip.h | 2 | ||||
-rw-r--r-- | net/ipv4/tcp.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/include/net/ip.h b/include/net/ip.h index 21df167a8e5b..79d13192ecc8 100644 --- a/include/net/ip.h +++ b/include/net/ip.h | |||
@@ -163,7 +163,7 @@ DECLARE_SNMP_STAT(struct ipstats_mib, ip_statistics); | |||
163 | DECLARE_SNMP_STAT(struct linux_mib, net_statistics); | 163 | DECLARE_SNMP_STAT(struct linux_mib, net_statistics); |
164 | #define NET_INC_STATS(net, field) do { (void)net; SNMP_INC_STATS(net_statistics, field); } while (0) | 164 | #define NET_INC_STATS(net, field) do { (void)net; SNMP_INC_STATS(net_statistics, field); } while (0) |
165 | #define NET_INC_STATS_BH(net, field) do { (void)net; SNMP_INC_STATS_BH(net_statistics, field); } while (0) | 165 | #define NET_INC_STATS_BH(net, field) do { (void)net; SNMP_INC_STATS_BH(net_statistics, field); } while (0) |
166 | #define NET_INC_STATS_USER(field) SNMP_INC_STATS_USER(net_statistics, field) | 166 | #define NET_INC_STATS_USER(net, field) do { (void)net; SNMP_INC_STATS_USER(net_statistics, field); } while (0) |
167 | #define NET_ADD_STATS_BH(field, adnd) SNMP_ADD_STATS_BH(net_statistics, field, adnd) | 167 | #define NET_ADD_STATS_BH(field, adnd) SNMP_ADD_STATS_BH(net_statistics, field, adnd) |
168 | #define NET_ADD_STATS_USER(field, adnd) SNMP_ADD_STATS_USER(net_statistics, field, adnd) | 168 | #define NET_ADD_STATS_USER(field, adnd) SNMP_ADD_STATS_USER(net_statistics, field, adnd) |
169 | 169 | ||
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 9e0e45c37806..dec0b8681119 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
@@ -1153,7 +1153,7 @@ static void tcp_prequeue_process(struct sock *sk) | |||
1153 | struct sk_buff *skb; | 1153 | struct sk_buff *skb; |
1154 | struct tcp_sock *tp = tcp_sk(sk); | 1154 | struct tcp_sock *tp = tcp_sk(sk); |
1155 | 1155 | ||
1156 | NET_INC_STATS_USER(LINUX_MIB_TCPPREQUEUED); | 1156 | NET_INC_STATS_USER(sock_net(sk), LINUX_MIB_TCPPREQUEUED); |
1157 | 1157 | ||
1158 | /* RX process wants to run with disabled BHs, though it is not | 1158 | /* RX process wants to run with disabled BHs, though it is not |
1159 | * necessary */ | 1159 | * necessary */ |
@@ -1793,13 +1793,13 @@ void tcp_close(struct sock *sk, long timeout) | |||
1793 | */ | 1793 | */ |
1794 | if (data_was_unread) { | 1794 | if (data_was_unread) { |
1795 | /* Unread data was tossed, zap the connection. */ | 1795 | /* Unread data was tossed, zap the connection. */ |
1796 | NET_INC_STATS_USER(LINUX_MIB_TCPABORTONCLOSE); | 1796 | NET_INC_STATS_USER(sock_net(sk), LINUX_MIB_TCPABORTONCLOSE); |
1797 | tcp_set_state(sk, TCP_CLOSE); | 1797 | tcp_set_state(sk, TCP_CLOSE); |
1798 | tcp_send_active_reset(sk, GFP_KERNEL); | 1798 | tcp_send_active_reset(sk, GFP_KERNEL); |
1799 | } else if (sock_flag(sk, SOCK_LINGER) && !sk->sk_lingertime) { | 1799 | } else if (sock_flag(sk, SOCK_LINGER) && !sk->sk_lingertime) { |
1800 | /* Check zero linger _after_ checking for unread data. */ | 1800 | /* Check zero linger _after_ checking for unread data. */ |
1801 | sk->sk_prot->disconnect(sk, 0); | 1801 | sk->sk_prot->disconnect(sk, 0); |
1802 | NET_INC_STATS_USER(LINUX_MIB_TCPABORTONDATA); | 1802 | NET_INC_STATS_USER(sock_net(sk), LINUX_MIB_TCPABORTONDATA); |
1803 | } else if (tcp_close_state(sk)) { | 1803 | } else if (tcp_close_state(sk)) { |
1804 | /* We FIN if the application ate all the data before | 1804 | /* We FIN if the application ate all the data before |
1805 | * zapping the connection. | 1805 | * zapping the connection. |