aboutsummaryrefslogtreecommitdiffstats
path: root/net/8021q/vlanproc.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2013-04-12 12:27:28 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2013-05-01 17:29:46 -0400
commita8ca16ea7b0abb0a7e49492d1123b715f0ec62e8 (patch)
treefe201353c71385cab2f3cc0d7235c76121f51789 /net/8021q/vlanproc.c
parent8d8b97ba499cb69fccb5fd9f2b439e3265fc3f27 (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/8021q/vlanproc.c')
-rw-r--r--net/8021q/vlanproc.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/net/8021q/vlanproc.c b/net/8021q/vlanproc.c
index 959ddbb0ca4d..1d0e89213a28 100644
--- a/net/8021q/vlanproc.c
+++ b/net/8021q/vlanproc.c
@@ -184,14 +184,9 @@ int vlan_proc_add_dev(struct net_device *vlandev)
184 */ 184 */
185int vlan_proc_rem_dev(struct net_device *vlandev) 185int vlan_proc_rem_dev(struct net_device *vlandev)
186{ 186{
187 struct vlan_net *vn = net_generic(dev_net(vlandev), vlan_net_id);
188
189 /** NOTE: This will consume the memory pointed to by dent, it seems. */ 187 /** NOTE: This will consume the memory pointed to by dent, it seems. */
190 if (vlan_dev_priv(vlandev)->dent) { 188 proc_remove(vlan_dev_priv(vlandev)->dent);
191 remove_proc_entry(vlan_dev_priv(vlandev)->dent->name, 189 vlan_dev_priv(vlandev)->dent = NULL;
192 vn->proc_vlan_dir);
193 vlan_dev_priv(vlandev)->dent = NULL;
194 }
195 return 0; 190 return 0;
196} 191}
197 192