diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2018-02-06 15:37:24 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-02-06 18:32:43 -0800 |
commit | efb1a57d90cae6af1ddd32f1b920c924a711aba5 (patch) | |
tree | 6aa5fba9d4240e0a171eb2ac9bfc9d64aae7aa2e /fs/proc/inode.c | |
parent | 53f63345d893df36b58e81ddb3d11dcd2e9cc966 (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/inode.c')
-rw-r--r-- | fs/proc/inode.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/proc/inode.c b/fs/proc/inode.c index 8dacaabb9f37..c5c8e7af5520 100644 --- a/fs/proc/inode.c +++ b/fs/proc/inode.c @@ -5,6 +5,7 @@ * Copyright (C) 1991, 1992 Linus Torvalds */ +#include <linux/cache.h> #include <linux/time.h> #include <linux/proc_fs.h> #include <linux/kernel.h> @@ -52,7 +53,7 @@ static void proc_evict_inode(struct inode *inode) } } -static struct kmem_cache * proc_inode_cachep; +static struct kmem_cache *proc_inode_cachep __ro_after_init; static struct inode *proc_alloc_inode(struct super_block *sb) { |