diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2009-12-15 19:45:39 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-16 10:19:57 -0500 |
commit | 135d5655dc58a24eda64e3f6c192d7d605e10050 (patch) | |
tree | 4851018ab64c1173059198dde42501cc615886b4 /fs/proc/internal.h | |
parent | f065f41f48569122b5bcddbd1ba2354f7cc29fdc (diff) |
proc: rename de_get() to pde_get() and inline it
* de_get() is trivial -- make inline, save a few bits of code, drop
"refcount is 0" check -- it should be done in some generic refcount
code, don't recall it's was helpful
* rename GET and PUT functions to pde_get(), pde_put() for cool prefix!
* remove obvious and incorrent comments
* in remove_proc_entry() use pde_put(), when I fixed PDE refcounting to
be normal one, remove_proc_entry() was supposed to do "-1" and code now
reflects that.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/proc/internal.h')
-rw-r--r-- | fs/proc/internal.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/proc/internal.h b/fs/proc/internal.h index 753ca37002c8..1f24a3eddd12 100644 --- a/fs/proc/internal.h +++ b/fs/proc/internal.h | |||
@@ -61,8 +61,6 @@ extern const struct file_operations proc_pagemap_operations; | |||
61 | extern const struct file_operations proc_net_operations; | 61 | extern const struct file_operations proc_net_operations; |
62 | extern const struct inode_operations proc_net_inode_operations; | 62 | extern const struct inode_operations proc_net_inode_operations; |
63 | 63 | ||
64 | void free_proc_entry(struct proc_dir_entry *de); | ||
65 | |||
66 | void proc_init_inodecache(void); | 64 | void proc_init_inodecache(void); |
67 | 65 | ||
68 | static inline struct pid *proc_pid(struct inode *inode) | 66 | static inline struct pid *proc_pid(struct inode *inode) |
@@ -101,8 +99,12 @@ unsigned long task_vsize(struct mm_struct *); | |||
101 | int task_statm(struct mm_struct *, int *, int *, int *, int *); | 99 | int task_statm(struct mm_struct *, int *, int *, int *, int *); |
102 | void task_mem(struct seq_file *, struct mm_struct *); | 100 | void task_mem(struct seq_file *, struct mm_struct *); |
103 | 101 | ||
104 | struct proc_dir_entry *de_get(struct proc_dir_entry *de); | 102 | static inline struct proc_dir_entry *pde_get(struct proc_dir_entry *pde) |
105 | void de_put(struct proc_dir_entry *de); | 103 | { |
104 | atomic_inc(&pde->count); | ||
105 | return pde; | ||
106 | } | ||
107 | void pde_put(struct proc_dir_entry *pde); | ||
106 | 108 | ||
107 | extern struct vfsmount *proc_mnt; | 109 | extern struct vfsmount *proc_mnt; |
108 | int proc_fill_super(struct super_block *); | 110 | int proc_fill_super(struct super_block *); |