aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/proc_fs.h
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2011-05-26 19:25:46 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-05-26 20:12:36 -0400
commit3864601387cf4196371e3c1897fdffa5228296f9 (patch)
tree1c517a970194f9e49ef98ef434c650771ffa31e1 /include/linux/proc_fs.h
parent63ab25ebbc50f74550bd8d164a34724b498f6fb9 (diff)
mm: extract exe_file handling from procfs
Setup and cleanup of mm_struct->exe_file is currently done in fs/proc/. This was because exe_file was needed only for /proc/<pid>/exe. Since we will need the exe_file functionality also for core dumps (so core name can contain full binary path), built this functionality always into the kernel. To achieve that move that out of proc FS to the kernel/ where in fact it should belong. By doing that we can make dup_mm_exe_file static. Also we can drop linux/proc_fs.h inclusion in fs/exec.c and kernel/fork.c. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/proc_fs.h')
-rw-r--r--include/linux/proc_fs.h19
1 files changed, 0 insertions, 19 deletions
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
index 648c9c58add7..e7576cf9e32d 100644
--- a/include/linux/proc_fs.h
+++ b/include/linux/proc_fs.h
@@ -173,12 +173,6 @@ extern void proc_net_remove(struct net *net, const char *name);
173extern struct proc_dir_entry *proc_net_mkdir(struct net *net, const char *name, 173extern struct proc_dir_entry *proc_net_mkdir(struct net *net, const char *name,
174 struct proc_dir_entry *parent); 174 struct proc_dir_entry *parent);
175 175
176/* While the {get|set|dup}_mm_exe_file functions are for mm_structs, they are
177 * only needed to implement /proc/<pid>|self/exe so we define them here. */
178extern void set_mm_exe_file(struct mm_struct *mm, struct file *new_exe_file);
179extern struct file *get_mm_exe_file(struct mm_struct *mm);
180extern void dup_mm_exe_file(struct mm_struct *oldmm, struct mm_struct *newmm);
181
182extern struct file *proc_ns_fget(int fd); 176extern struct file *proc_ns_fget(int fd);
183 177
184#else 178#else
@@ -230,19 +224,6 @@ static inline void pid_ns_release_proc(struct pid_namespace *ns)
230{ 224{
231} 225}
232 226
233static inline void set_mm_exe_file(struct mm_struct *mm,
234 struct file *new_exe_file)
235{}
236
237static inline struct file *get_mm_exe_file(struct mm_struct *mm)
238{
239 return NULL;
240}
241
242static inline void dup_mm_exe_file(struct mm_struct *oldmm,
243 struct mm_struct *newmm)
244{}
245
246static inline struct file *proc_ns_fget(int fd) 227static inline struct file *proc_ns_fget(int fd)
247{ 228{
248 return ERR_PTR(-EINVAL); 229 return ERR_PTR(-EINVAL);