summaryrefslogtreecommitdiff
path: root/fs/proc/meminfo.c
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2022-09-20 20:35:23 +0300
committerAndrew Morton <akpm@linux-foundation.org>2022-10-04 00:21:45 +0300
commitef1d61781bc6708ccc4a21262cc80a7dad952e04 (patch)
tree8718e18c0d48dcd197f78ab1924ac7d21cab0ac5 /fs/proc/meminfo.c
parentda6f79164e98de4ab3f2fdeea4875207fe282014 (diff)
downloadlinux-ef1d61781bc6708ccc4a21262cc80a7dad952e04.tar.xz
proc: mark more files as permanent
Mark /proc/devices /proc/kpagecount /proc/kpageflags /proc/kpagecgroup /proc/loadavg /proc/meminfo /proc/softirqs /proc/uptime /proc/version as permanent /proc entries, saving alloc/free and some list/spinlock ops per use. These files are never removed by the kernel so it is OK to mark them. Link: https://lkml.kernel.org/r/Yyn527DzDMa+r0Yj@localhost.localdomain Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'fs/proc/meminfo.c')
-rw-r--r--fs/proc/meminfo.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/proc/meminfo.c b/fs/proc/meminfo.c
index 6e89f0e2fd20..70e5294052d5 100644
--- a/fs/proc/meminfo.c
+++ b/fs/proc/meminfo.c
@@ -162,7 +162,10 @@ static int meminfo_proc_show(struct seq_file *m, void *v)
static int __init proc_meminfo_init(void)
{
- proc_create_single("meminfo", 0, NULL, meminfo_proc_show);
+ struct proc_dir_entry *pde;
+
+ pde = proc_create_single("meminfo", 0, NULL, meminfo_proc_show);
+ pde_make_permanent(pde);
return 0;
}
fs_initcall(proc_meminfo_init);