diff options
Diffstat (limited to 'net/ipv4/af_inet.c')
-rw-r--r-- | net/ipv4/af_inet.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c index 163ae4068b5f..9e83d7773d8f 100644 --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c | |||
@@ -114,10 +114,6 @@ | |||
114 | 114 | ||
115 | DEFINE_SNMP_STAT(struct linux_mib, net_statistics); | 115 | DEFINE_SNMP_STAT(struct linux_mib, net_statistics); |
116 | 116 | ||
117 | #ifdef INET_REFCNT_DEBUG | ||
118 | atomic_t inet_sock_nr; | ||
119 | #endif | ||
120 | |||
121 | extern void ip_mc_drop_socket(struct sock *sk); | 117 | extern void ip_mc_drop_socket(struct sock *sk); |
122 | 118 | ||
123 | /* The inetsw table contains everything that inet_create needs to | 119 | /* The inetsw table contains everything that inet_create needs to |
@@ -153,11 +149,7 @@ void inet_sock_destruct(struct sock *sk) | |||
153 | if (inet->opt) | 149 | if (inet->opt) |
154 | kfree(inet->opt); | 150 | kfree(inet->opt); |
155 | dst_release(sk->sk_dst_cache); | 151 | dst_release(sk->sk_dst_cache); |
156 | #ifdef INET_REFCNT_DEBUG | 152 | sk_refcnt_debug_dec(sk); |
157 | atomic_dec(&inet_sock_nr); | ||
158 | printk(KERN_DEBUG "INET socket %p released, %d are still alive\n", | ||
159 | sk, atomic_read(&inet_sock_nr)); | ||
160 | #endif | ||
161 | } | 153 | } |
162 | 154 | ||
163 | /* | 155 | /* |
@@ -317,9 +309,7 @@ static int inet_create(struct socket *sock, int protocol) | |||
317 | inet->mc_index = 0; | 309 | inet->mc_index = 0; |
318 | inet->mc_list = NULL; | 310 | inet->mc_list = NULL; |
319 | 311 | ||
320 | #ifdef INET_REFCNT_DEBUG | 312 | sk_refcnt_debug_inc(sk); |
321 | atomic_inc(&inet_sock_nr); | ||
322 | #endif | ||
323 | 313 | ||
324 | if (inet->num) { | 314 | if (inet->num) { |
325 | /* It assumes that any protocol which allows | 315 | /* It assumes that any protocol which allows |
@@ -1205,7 +1195,3 @@ EXPORT_SYMBOL(inet_stream_ops); | |||
1205 | EXPORT_SYMBOL(inet_unregister_protosw); | 1195 | EXPORT_SYMBOL(inet_unregister_protosw); |
1206 | EXPORT_SYMBOL(net_statistics); | 1196 | EXPORT_SYMBOL(net_statistics); |
1207 | EXPORT_SYMBOL(sysctl_ip_nonlocal_bind); | 1197 | EXPORT_SYMBOL(sysctl_ip_nonlocal_bind); |
1208 | |||
1209 | #ifdef INET_REFCNT_DEBUG | ||
1210 | EXPORT_SYMBOL(inet_sock_nr); | ||
1211 | #endif | ||