Skip to contentSkip to conversation

namespace pollution in procfs

TRIVIAL Rusty Trivial Russell 1 participant 1 message Jan 6, 2003 Proc filesystem

lore
Share & tools
lore
#0 lore raw

From: Arnd Bergmann <[email protected]>

de_get and de_put are used only in the file they are defined in, so make them static
===== fs/proc/inode.c 1.18 vs edited =====

fs/proc/inode.c renamed from fs/proc/inode.c.orig +2 -2
@@ -23,7 +23,7 @@
 
 extern void free_proc_entry(struct proc_dir_entry *);
 
-struct proc_dir_entry * de_get(struct proc_dir_entry *de)
+static inline struct proc_dir_entry * de_get(struct proc_dir_entry *de)
 {
 	if (de)
 		atomic_inc(&de->count);
@@ -33,7 +33,7 @@
 /*
  * Decrements the use count and checks for deferred deletion.
  */
-void de_put(struct proc_dir_entry *de)
+static void de_put(struct proc_dir_entry *de)
 {
 	if (de) {	
 		lock_kernel();		
Signature · 2 lines
  Don't blame me: the Monkey is driving
  File: Arnd Bergmann <[email protected]>: [PATCH] namespace pollution in procfs