diff options
author | Jiri Slaby <jslaby@suse.cz> | 2011-05-26 19:25:46 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-26 20:12:36 -0400 |
commit | 3864601387cf4196371e3c1897fdffa5228296f9 (patch) | |
tree | 1c517a970194f9e49ef98ef434c650771ffa31e1 /include/linux/mm.h | |
parent | 63ab25ebbc50f74550bd8d164a34724b498f6fb9 (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/mm.h')
-rw-r--r-- | include/linux/mm.h | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index fb8e814f78dc..9670f71d7be9 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -1408,17 +1408,11 @@ extern void exit_mmap(struct mm_struct *); | |||
1408 | extern int mm_take_all_locks(struct mm_struct *mm); | 1408 | extern int mm_take_all_locks(struct mm_struct *mm); |
1409 | extern void mm_drop_all_locks(struct mm_struct *mm); | 1409 | extern void mm_drop_all_locks(struct mm_struct *mm); |
1410 | 1410 | ||
1411 | #ifdef CONFIG_PROC_FS | ||
1412 | /* From fs/proc/base.c. callers must _not_ hold the mm's exe_file_lock */ | 1411 | /* From fs/proc/base.c. callers must _not_ hold the mm's exe_file_lock */ |
1413 | extern void added_exe_file_vma(struct mm_struct *mm); | 1412 | extern void added_exe_file_vma(struct mm_struct *mm); |
1414 | extern void removed_exe_file_vma(struct mm_struct *mm); | 1413 | extern void removed_exe_file_vma(struct mm_struct *mm); |
1415 | #else | 1414 | extern void set_mm_exe_file(struct mm_struct *mm, struct file *new_exe_file); |
1416 | static inline void added_exe_file_vma(struct mm_struct *mm) | 1415 | extern struct file *get_mm_exe_file(struct mm_struct *mm); |
1417 | {} | ||
1418 | |||
1419 | static inline void removed_exe_file_vma(struct mm_struct *mm) | ||
1420 | {} | ||
1421 | #endif /* CONFIG_PROC_FS */ | ||
1422 | 1416 | ||
1423 | extern int may_expand_vm(struct mm_struct *mm, unsigned long npages); | 1417 | extern int may_expand_vm(struct mm_struct *mm, unsigned long npages); |
1424 | extern int install_special_mapping(struct mm_struct *mm, | 1418 | extern int install_special_mapping(struct mm_struct *mm, |