net: proc: change proc_net_remove to remove_proc_entry
proc_net_remove is only used to remove proc entries that under /proc/net,it's not a general function for removing proc entries of netns. if we want to remove some proc entries which under /proc/net/stat/, we still need to call remove_proc_entry. this patch use remove_proc_entry to replace proc_net_remove. we can remove proc_net_remove after this patch. Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
b4278c961a
commit
ece31ffd53
@@ -244,7 +244,7 @@ static __init int tcpprobe_init(void)
|
||||
pr_info("probe registered (port=%d) bufsize=%u\n", port, bufsize);
|
||||
return 0;
|
||||
err1:
|
||||
proc_net_remove(&init_net, procname);
|
||||
remove_proc_entry(procname, init_net.proc_net);
|
||||
err0:
|
||||
kfree(tcp_probe.log);
|
||||
return ret;
|
||||
@@ -253,7 +253,7 @@ module_init(tcpprobe_init);
|
||||
|
||||
static __exit void tcpprobe_exit(void)
|
||||
{
|
||||
proc_net_remove(&init_net, procname);
|
||||
remove_proc_entry(procname, init_net.proc_net);
|
||||
unregister_jprobe(&tcp_jprobe);
|
||||
kfree(tcp_probe.log);
|
||||
}
|
||||
|
Reference in New Issue
Block a user