aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_probe.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/tcp_probe.c')
-rw-r--r--net/ipv4/tcp_probe.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv4/tcp_probe.c b/net/ipv4/tcp_probe.c
index 4526fe68e60e..d4943f67aff2 100644
--- a/net/ipv4/tcp_probe.c
+++ b/net/ipv4/tcp_probe.c
@@ -234,7 +234,7 @@ static __init int tcpprobe_init(void)
234 if (!tcp_probe.log) 234 if (!tcp_probe.log)
235 goto err0; 235 goto err0;
236 236
237 if (!proc_net_fops_create(&init_net, procname, S_IRUSR, &tcpprobe_fops)) 237 if (!proc_create(procname, S_IRUSR, init_net.proc_net, &tcpprobe_fops))
238 goto err0; 238 goto err0;
239 239
240 ret = register_jprobe(&tcp_jprobe); 240 ret = register_jprobe(&tcp_jprobe);
@@ -244,7 +244,7 @@ static __init int tcpprobe_init(void)
244 pr_info("probe registered (port=%d) bufsize=%u\n", port, bufsize); 244 pr_info("probe registered (port=%d) bufsize=%u\n", port, bufsize);
245 return 0; 245 return 0;
246 err1: 246 err1:
247 proc_net_remove(&init_net, procname); 247 remove_proc_entry(procname, init_net.proc_net);
248 err0: 248 err0:
249 kfree(tcp_probe.log); 249 kfree(tcp_probe.log);
250 return ret; 250 return ret;
@@ -253,7 +253,7 @@ module_init(tcpprobe_init);
253 253
254static __exit void tcpprobe_exit(void) 254static __exit void tcpprobe_exit(void)
255{ 255{
256 proc_net_remove(&init_net, procname); 256 remove_proc_entry(procname, init_net.proc_net);
257 unregister_jprobe(&tcp_jprobe); 257 unregister_jprobe(&tcp_jprobe);
258 kfree(tcp_probe.log); 258 kfree(tcp_probe.log);
259} 259}