summaryrefslogtreecommitdiffstats
path: root/fs/proc/self.c
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2018-02-06 18:37:24 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2018-02-06 21:32:43 -0500
commitefb1a57d90cae6af1ddd32f1b920c924a711aba5 (patch)
tree6aa5fba9d4240e0a171eb2ac9bfc9d64aae7aa2e /fs/proc/self.c
parent53f63345d893df36b58e81ddb3d11dcd2e9cc966 (diff)
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 <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/proc/self.c')
-rw-r--r--fs/proc/self.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/proc/self.c b/fs/proc/self.c
index d30627aa440b..4d7d061696b3 100644
--- a/fs/proc/self.c
+++ b/fs/proc/self.c
@@ -1,4 +1,5 @@
1// SPDX-License-Identifier: GPL-2.0 1// SPDX-License-Identifier: GPL-2.0
2#include <linux/cache.h>
2#include <linux/sched.h> 3#include <linux/sched.h>
3#include <linux/slab.h> 4#include <linux/slab.h>
4#include <linux/pid_namespace.h> 5#include <linux/pid_namespace.h>
@@ -30,7 +31,7 @@ static const struct inode_operations proc_self_inode_operations = {
30 .get_link = proc_self_get_link, 31 .get_link = proc_self_get_link,
31}; 32};
32 33
33static unsigned self_inum; 34static unsigned self_inum __ro_after_init;
34 35
35int proc_setup_self(struct super_block *s) 36int proc_setup_self(struct super_block *s)
36{ 37{