mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
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 <[email protected]> Acked-by: Grant Likely <[email protected]> cc: [email protected] cc: [email protected] cc: [email protected] cc: [email protected] cc: [email protected] cc: [email protected] cc: [email protected] Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
8d8b97ba49
commit
a8ca16ea7b
14 changed files with 33 additions and 73 deletions
|
|
@ -287,8 +287,7 @@ int snmp6_unregister_dev(struct inet6_dev *idev)
|
|||
return -ENOENT;
|
||||
if (!idev->stats.proc_dir_entry)
|
||||
return -EINVAL;
|
||||
remove_proc_entry(idev->stats.proc_dir_entry->name,
|
||||
net->mib.proc_net_devsnmp6);
|
||||
proc_remove(idev->stats.proc_dir_entry);
|
||||
idev->stats.proc_dir_entry = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue