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 a8275b1338d7..02924fb4bdbf 100644 --- a/include/net/ip.h +++ b/include/net/ip.h | |||
@@ -165,7 +165,7 @@ DECLARE_SNMP_STAT(struct linux_mib, net_statistics); | |||
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(net, field) do { (void)net; SNMP_INC_STATS_USER(net_statistics, field); } while (0) | 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(net, field, adnd) do { (void)net; SNMP_ADD_STATS_BH(net_statistics, field, adnd); } while (0) | 167 | #define NET_ADD_STATS_BH(net, field, adnd) do { (void)net; SNMP_ADD_STATS_BH(net_statistics, field, adnd); } while (0) |
168 | #define NET_ADD_STATS_USER(field, adnd) SNMP_ADD_STATS_USER(net_statistics, field, adnd) | 168 | #define NET_ADD_STATS_USER(net, field, adnd) do { (void)net; SNMP_ADD_STATS_USER(net_statistics, field, adnd); } while (0) |
169 | 169 | ||
170 | extern unsigned long snmp_fold_field(void *mib[], int offt); | 170 | extern unsigned long snmp_fold_field(void *mib[], int offt); |
171 | extern int snmp_mib_init(void *ptr[2], size_t mibsize); | 171 | extern int snmp_mib_init(void *ptr[2], size_t mibsize); |
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index dec0b8681119..eec8cf7c0247 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
@@ -1475,7 +1475,7 @@ int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, | |||
1475 | /* __ Restore normal policy in scheduler __ */ | 1475 | /* __ Restore normal policy in scheduler __ */ |
1476 | 1476 | ||
1477 | if ((chunk = len - tp->ucopy.len) != 0) { | 1477 | if ((chunk = len - tp->ucopy.len) != 0) { |
1478 | NET_ADD_STATS_USER(LINUX_MIB_TCPDIRECTCOPYFROMBACKLOG, chunk); | 1478 | NET_ADD_STATS_USER(sock_net(sk), LINUX_MIB_TCPDIRECTCOPYFROMBACKLOG, chunk); |
1479 | len -= chunk; | 1479 | len -= chunk; |
1480 | copied += chunk; | 1480 | copied += chunk; |
1481 | } | 1481 | } |
@@ -1486,7 +1486,7 @@ do_prequeue: | |||
1486 | tcp_prequeue_process(sk); | 1486 | tcp_prequeue_process(sk); |
1487 | 1487 | ||
1488 | if ((chunk = len - tp->ucopy.len) != 0) { | 1488 | if ((chunk = len - tp->ucopy.len) != 0) { |
1489 | NET_ADD_STATS_USER(LINUX_MIB_TCPDIRECTCOPYFROMPREQUEUE, chunk); | 1489 | NET_ADD_STATS_USER(sock_net(sk), LINUX_MIB_TCPDIRECTCOPYFROMPREQUEUE, chunk); |
1490 | len -= chunk; | 1490 | len -= chunk; |
1491 | copied += chunk; | 1491 | copied += chunk; |
1492 | } | 1492 | } |
@@ -1601,7 +1601,7 @@ skip_copy: | |||
1601 | tcp_prequeue_process(sk); | 1601 | tcp_prequeue_process(sk); |
1602 | 1602 | ||
1603 | if (copied > 0 && (chunk = len - tp->ucopy.len) != 0) { | 1603 | if (copied > 0 && (chunk = len - tp->ucopy.len) != 0) { |
1604 | NET_ADD_STATS_USER(LINUX_MIB_TCPDIRECTCOPYFROMPREQUEUE, chunk); | 1604 | NET_ADD_STATS_USER(sock_net(sk), LINUX_MIB_TCPDIRECTCOPYFROMPREQUEUE, chunk); |
1605 | len -= chunk; | 1605 | len -= chunk; |
1606 | copied += chunk; | 1606 | copied += chunk; |
1607 | } | 1607 | } |