diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2016-12-13 01:45:32 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-12-13 03:55:09 +0100 |
commit | 1270dd8d994039b677d0504ba7260873d608bf75 (patch) | |
tree | ced0d62305e9cfa38afb22f6eed06e59e499763d /fs/proc/internal.h | |
parent | fs/proc/base.c: save decrement during lookup/readdir in /proc/$PID (diff) | |
download | linux-1270dd8d994039b677d0504ba7260873d608bf75.tar.xz linux-1270dd8d994039b677d0504ba7260873d608bf75.zip |
fs/proc: calculate /proc/* and /proc/*/task/* nlink at init time
Runtime nlink calculation works but meh. I don't know how to do it at
compile time, but I know how to do it at init time.
Shift "2+" part into init time as a bonus.
Link: http://lkml.kernel.org/r/20161122195549.GB29812@avx2
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Reviewed-by: Vegard Nossum <vegard.nossum@oracle.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 | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/proc/internal.h b/fs/proc/internal.h index 153db5f85b47..bbba5d22aada 100644 --- a/fs/proc/internal.h +++ b/fs/proc/internal.h @@ -211,6 +211,7 @@ extern const struct inode_operations proc_link_inode_operations; extern const struct inode_operations proc_pid_link_inode_operations; extern void proc_init_inodecache(void); +void set_proc_pid_nlink(void); extern struct inode *proc_get_inode(struct super_block *, struct proc_dir_entry *); extern int proc_fill_super(struct super_block *, void *data, int flags); extern void proc_entry_rundown(struct proc_dir_entry *); |