aboutsummaryrefslogtreecommitdiffstats
path: root/lib/debugobjects.c
diff options
context:
space:
mode:
authorAlexey Dobriyan <[email protected]>2023-10-11 16:55:00 +0000
committerAndrew Morton <[email protected]>2023-10-18 21:43:23 +0000
commit68279f9c9f592e75d30a9ba5154a15e0a0b42ae8 (patch)
treeacbebe6f512f63e0bdcf876a4fb4991520a5499f /lib/debugobjects.c
parentfs: ocfs2: check status values (diff)
downloadkernel-68279f9c9f592e75d30a9ba5154a15e0a0b42ae8.tar.gz
kernel-68279f9c9f592e75d30a9ba5154a15e0a0b42ae8.zip
treewide: mark stuff as __ro_after_init
__read_mostly predates __ro_after_init. Many variables which are marked __read_mostly should have been __ro_after_init from day 1. Also, mark some stuff as "const" and "__init" while I'm at it. [[email protected]: revert sysctl_nr_open_min, sysctl_nr_open_max changes due to arm warning] [[email protected]: coding-style cleanups] Link: https://lkml.kernel.org/r/4f6bb9c0-abba-4ee4-a7aa-89265e886817@p183 Signed-off-by: Alexey Dobriyan <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'lib/debugobjects.c')
-rw-r--r--lib/debugobjects.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/debugobjects.c b/lib/debugobjects.c
index a517256a270b..2a8e9d63fbe3 100644
--- a/lib/debugobjects.c
+++ b/lib/debugobjects.c
@@ -89,7 +89,7 @@ static int debug_objects_pool_size __read_mostly
static int debug_objects_pool_min_level __read_mostly
= ODEBUG_POOL_MIN_LEVEL;
static const struct debug_obj_descr *descr_test __read_mostly;
-static struct kmem_cache *obj_cache __read_mostly;
+static struct kmem_cache *obj_cache __ro_after_init;
/*
* Track numbers of kmem_cache_alloc()/free() calls done.