summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorKunwu Chan <chentao@kylinos.cn>2024-01-17 15:20:45 +0800
committerFlorian Westphal <fw@strlen.de>2024-01-29 15:43:20 +0100
commitd5f9142fb96d4386ff4d06745bbd8f8c73b3791b (patch)
tree3326129b494143d24177ffacd5d7c00d21b85ebc /net
parent2ae6e9a03dadee5b2749d391d2e6df3056c5b6dd (diff)
ipvs: Simplify the allocation of ip_vs_conn slab caches
Use the new KMEM_CACHE() macro instead of direct kmem_cache_create to simplify the creation of SLAB caches. Signed-off-by: Kunwu Chan <chentao@kylinos.cn> Acked-by: Simon Horman <horms@kernel.org> Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'net')
-rw-r--r--net/netfilter/ipvs/ip_vs_conn.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/netfilter/ipvs/ip_vs_conn.c b/net/netfilter/ipvs/ip_vs_conn.c
index a743db073887..98d7dbe3d787 100644
--- a/net/netfilter/ipvs/ip_vs_conn.c
+++ b/net/netfilter/ipvs/ip_vs_conn.c
@@ -1511,9 +1511,7 @@ int __init ip_vs_conn_init(void)
return -ENOMEM;
/* Allocate ip_vs_conn slab cache */
- ip_vs_conn_cachep = kmem_cache_create("ip_vs_conn",
- sizeof(struct ip_vs_conn), 0,
- SLAB_HWCACHE_ALIGN, NULL);
+ ip_vs_conn_cachep = KMEM_CACHE(ip_vs_conn, SLAB_HWCACHE_ALIGN);
if (!ip_vs_conn_cachep) {
kvfree(ip_vs_conn_tab);
return -ENOMEM;