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/ipv4 | |
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/ipv4')
-rw-r--r-- | net/ipv4/netfilter/ipt_CLUSTERIP.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/netfilter/ipt_CLUSTERIP.c b/net/ipv4/netfilter/ipt_CLUSTERIP.c index e4738fef070a..0b732efd32e2 100644 --- a/net/ipv4/netfilter/ipt_CLUSTERIP.c +++ b/net/ipv4/netfilter/ipt_CLUSTERIP.c | |||
@@ -105,7 +105,7 @@ clusterip_config_entry_put(struct clusterip_config *c) | |||
105 | * functions are also incrementing the refcount on their own, | 105 | * functions are also incrementing the refcount on their own, |
106 | * so it's safe to remove the entry even if it's in use. */ | 106 | * so it's safe to remove the entry even if it's in use. */ |
107 | #ifdef CONFIG_PROC_FS | 107 | #ifdef CONFIG_PROC_FS |
108 | remove_proc_entry(c->pde->name, c->pde->parent); | 108 | proc_remove(c->pde); |
109 | #endif | 109 | #endif |
110 | return; | 110 | return; |
111 | } | 111 | } |
@@ -736,7 +736,7 @@ static void __exit clusterip_tg_exit(void) | |||
736 | { | 736 | { |
737 | pr_info("ClusterIP Version %s unloading\n", CLUSTERIP_VERSION); | 737 | pr_info("ClusterIP Version %s unloading\n", CLUSTERIP_VERSION); |
738 | #ifdef CONFIG_PROC_FS | 738 | #ifdef CONFIG_PROC_FS |
739 | remove_proc_entry(clusterip_procdir->name, clusterip_procdir->parent); | 739 | proc_remove(clusterip_procdir); |
740 | #endif | 740 | #endif |
741 | nf_unregister_hook(&cip_arp_ops); | 741 | nf_unregister_hook(&cip_arp_ops); |
742 | xt_unregister_target(&clusterip_tg_reg); | 742 | xt_unregister_target(&clusterip_tg_reg); |