提交 a9c19329 编写于 作者: P Pavel Emelyanov 提交者: David S. Miller

tcp: add net to tcp_mib_init

This one sets TCP MIBs after zeroing them, and thus requires
the net.

The existing single caller can use init_net (temporarily).
Signed-off-by: NPavel Emelyanov <xemul@openvz.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 f10f8431
...@@ -1024,7 +1024,7 @@ static inline int tcp_paws_check(const struct tcp_options_received *rx_opt, int ...@@ -1024,7 +1024,7 @@ static inline int tcp_paws_check(const struct tcp_options_received *rx_opt, int
#define TCP_CHECK_TIMER(sk) do { } while (0) #define TCP_CHECK_TIMER(sk) do { } while (0)
static inline void tcp_mib_init(void) static inline void tcp_mib_init(struct net *net)
{ {
/* See RFC 2012 */ /* See RFC 2012 */
TCP_ADD_STATS_USER(TCP_MIB_RTOALGORITHM, 1); TCP_ADD_STATS_USER(TCP_MIB_RTOALGORITHM, 1);
......
...@@ -1363,7 +1363,7 @@ static int __init init_ipv4_mibs(void) ...@@ -1363,7 +1363,7 @@ static int __init init_ipv4_mibs(void)
sizeof(struct udp_mib)) < 0) sizeof(struct udp_mib)) < 0)
goto err_udplite_mib; goto err_udplite_mib;
tcp_mib_init(); tcp_mib_init(&init_net);
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册