[PATCH] proc: Rewrite the proc dentry flush on exit optimization
To keep the dcache from filling up with dead /proc entries we flush them on process exit. However over the years that code has gotten hairy with a dentry_pointer and a lock in task_struct and misdocumented as a correctness feature. I have rewritten this code to look and see if we have a corresponding entry in the dcache and if so flush it on process exit. This removes the extra fields in the task_struct and allows me to trivially handle the case of a /proc/<tgid>/task/<pid> entry as well as the current /proc/<pid> entries. Signed-off-by:Eric W. Biederman <ebiederm@xmission.com> Signed-off-by:
Andrew Morton <akpm@osdl.org> Signed-off-by:
Linus Torvalds <torvalds@osdl.org>
Showing
- fs/exec.c 0 additions, 10 deletionsfs/exec.c
- fs/proc/base.c 61 additions, 73 deletionsfs/proc/base.c
- include/linux/init_task.h 0 additions, 1 deletioninclude/linux/init_task.h
- include/linux/proc_fs.h 2 additions, 4 deletionsinclude/linux/proc_fs.h
- include/linux/sched.h 0 additions, 3 deletionsinclude/linux/sched.h
- kernel/exit.c 1 addition, 6 deletionskernel/exit.c
- kernel/fork.c 0 additions, 3 deletionskernel/fork.c
Loading
Please register or sign in to comment