diff options
author | David Howells <dhowells@redhat.com> | 2013-04-12 12:27:28 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-05-01 17:29:46 -0400 |
commit | a8ca16ea7b0abb0a7e49492d1123b715f0ec62e8 (patch) | |
tree | fe201353c71385cab2f3cc0d7235c76121f51789 /net/ipv6 | |
parent | 8d8b97ba499cb69fccb5fd9f2b439e3265fc3f27 (diff) |
proc: Supply a function to remove a proc entry by PDE
Supply a function (proc_remove()) to remove a proc entry (and any subtree
rooted there) by proc_dir_entry pointer rather than by name and (optionally)
root dir entry pointer. This allows us to eliminate all remaining pde->name
accesses outside of procfs.
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Grant Likely <grant.likely@linaro.or>
cc: linux-acpi@vger.kernel.org
cc: openipmi-developer@lists.sourceforge.net
cc: devicetree-discuss@lists.ozlabs.org
cc: linux-pci@vger.kernel.org
cc: netdev@vger.kernel.org
cc: netfilter-devel@vger.kernel.org
cc: alsa-devel@alsa-project.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/proc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv6/proc.c b/net/ipv6/proc.c index 7ea6e180139c..537d9ee7209f 100644 --- a/net/ipv6/proc.c +++ b/net/ipv6/proc.c | |||
@@ -287,8 +287,7 @@ int snmp6_unregister_dev(struct inet6_dev *idev) | |||
287 | return -ENOENT; | 287 | return -ENOENT; |
288 | if (!idev->stats.proc_dir_entry) | 288 | if (!idev->stats.proc_dir_entry) |
289 | return -EINVAL; | 289 | return -EINVAL; |
290 | remove_proc_entry(idev->stats.proc_dir_entry->name, | 290 | proc_remove(idev->stats.proc_dir_entry); |
291 | net->mib.proc_net_devsnmp6); | ||
292 | idev->stats.proc_dir_entry = NULL; | 291 | idev->stats.proc_dir_entry = NULL; |
293 | return 0; | 292 | return 0; |
294 | } | 293 | } |