Fix deletion of aggregate_ogm in /proc/net/batman-adv

Message ID 1235472760-8775-1-git-send-email-sven.eckelmann@gmx.de (mailing list archive)
State Accepted, archived
Headers

Commit Message

Sven Eckelmann Feb. 24, 2009, 10:52 a.m. UTC
  remove_proc_entry needs as second parameter the parent directory and
not the proc_dir_entry of the file to delete. Otherwise nothing will
be removed the deletion of /proc/net/batman-adv will fail because it
still has child nodes.

Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
---
 batman-adv-kernelland/proc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
  

Patch

diff --git a/batman-adv-kernelland/proc.c b/batman-adv-kernelland/proc.c
index 6c475d4..00e177a 100644
--- a/batman-adv-kernelland/proc.c
+++ b/batman-adv-kernelland/proc.c
@@ -134,7 +134,7 @@  void cleanup_procfs(void)
 		remove_proc_entry(PROC_FILE_VIS, proc_batman_dir);
 
 	if (proc_aggr_file)
-		remove_proc_entry(PROC_FILE_AGGR, proc_aggr_file);
+		remove_proc_entry(PROC_FILE_AGGR, proc_batman_dir);
 
 	if (proc_batman_dir)
 #ifdef __NET_NET_NAMESPACE_H