Skip to content

Commit

Permalink
tcp: add net to tcp_mib_init
Browse files Browse the repository at this point in the history
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: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Pavel Emelyanov authored and David S. Miller committed Jul 17, 2008
1 parent f10f843 commit a9c1932
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/net/tcp.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)

static inline void tcp_mib_init(void)
static inline void tcp_mib_init(struct net *net)
{
/* See RFC 2012 */
TCP_ADD_STATS_USER(TCP_MIB_RTOALGORITHM, 1);
Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/af_inet.c
Original file line number Diff line number Diff line change
Expand Up @@ -1363,7 +1363,7 @@ static int __init init_ipv4_mibs(void)
sizeof(struct udp_mib)) < 0)
goto err_udplite_mib;

tcp_mib_init();
tcp_mib_init(&init_net);

return 0;

Expand Down

0 comments on commit a9c1932

Please sign in to comment.