aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/fib_trie.c
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2018-02-24 21:20:33 +0300
committerDavid S. Miller <davem@davemloft.net>2018-02-26 15:11:48 -0500
commit08009a760213cf6125af9453a51203f4ae108ba1 (patch)
treebcd9f2638df9b6d25f09eccc48b81ec1bee995a5 /net/ipv4/fib_trie.c
parentMerge branch 'sonic-ethernet-cleanups' (diff)
downloadlinux-dev-08009a760213cf6125af9453a51203f4ae108ba1.tar.xz
linux-dev-08009a760213cf6125af9453a51203f4ae108ba1.zip
net: make kmem caches as __ro_after_init
All kmem caches aren't reallocated once set up. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/fib_trie.c')
-rw-r--r--net/ipv4/fib_trie.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c
index 5530cd6fdbc7..62243a8abf92 100644
--- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c
@@ -50,6 +50,7 @@
#define VERSION "0.409"
+#include <linux/cache.h>
#include <linux/uaccess.h>
#include <linux/bitops.h>
#include <linux/types.h>
@@ -191,8 +192,8 @@ static size_t tnode_free_size;
*/
static const int sync_pages = 128;
-static struct kmem_cache *fn_alias_kmem __read_mostly;
-static struct kmem_cache *trie_leaf_kmem __read_mostly;
+static struct kmem_cache *fn_alias_kmem __ro_after_init;
+static struct kmem_cache *trie_leaf_kmem __ro_after_init;
static inline struct tnode *tn_info(struct key_vector *kv)
{