diff options
| author | Alexey Dobriyan <[email protected]> | 2018-02-06 23:37:24 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2018-02-07 02:32:43 +0000 |
| commit | efb1a57d90cae6af1ddd32f1b920c924a711aba5 (patch) | |
| tree | 6aa5fba9d4240e0a171eb2ac9bfc9d64aae7aa2e /fs/proc/base.c | |
| parent | fs/proc/internal.h: fix up comment (diff) | |
| download | kernel-efb1a57d90cae6af1ddd32f1b920c924a711aba5.tar.gz kernel-efb1a57d90cae6af1ddd32f1b920c924a711aba5.zip | |
fs/proc: use __ro_after_init
/proc/self inode numbers, value of proc_inode_cache and st_nlink of
/proc/$TGID are fixed constants.
Link: http://lkml.kernel.org/r/20180103184707.GA31849@avx2
Signed-off-by: Alexey Dobriyan <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'fs/proc/base.c')
| -rw-r--r-- | fs/proc/base.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c index a3efc2427c74..9298324325ed 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -75,6 +75,7 @@ #include <linux/ptrace.h> #include <linux/tracehook.h> #include <linux/printk.h> +#include <linux/cache.h> #include <linux/cgroup.h> #include <linux/cpuset.h> #include <linux/audit.h> @@ -112,8 +113,8 @@ * in /proc for a task before it execs a suid executable. */ -static u8 nlink_tid; -static u8 nlink_tgid; +static u8 nlink_tid __ro_after_init; +static u8 nlink_tgid __ro_after_init; struct pid_entry { const char *name; |
