patch-2.2.2 linux/kernel/sysctl.c
Next file: linux/mm/filemap.c
Previous file: linux/kernel/sched.c
Back to the patch index
Back to the overall index
- Lines: 27
- Date:
Sat Feb 6 12:22:24 1999
- Orig file:
v2.2.1/linux/kernel/sysctl.c
- Orig date:
Wed Jan 13 15:00:44 1999
diff -u --recursive --new-file v2.2.1/linux/kernel/sysctl.c linux/kernel/sysctl.c
@@ -557,14 +557,19 @@
continue;
}
unregister_proc_table(table->child, de);
+
+ /* Don't unregister directories which still have entries.. */
+ if (de->subdir)
+ continue;
}
- /* Don't unregister proc directories which still have
- entries... */
- if (!((de->mode & S_IFDIR) && de->subdir)) {
- proc_unregister(root, de->low_ino);
- table->de = NULL;
- kfree(de);
- }
+
+ /* Don't unregoster proc entries that are still being used.. */
+ if (de->count)
+ continue;
+
+ proc_unregister(root, de->low_ino);
+ table->de = NULL;
+ kfree(de);
}
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)