Commit d5f9142f authored by Kunwu Chan's avatar Kunwu Chan Committed by Florian Westphal
Browse files

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: default avatarKunwu Chan <chentao@kylinos.cn>
Acked-by: default avatarSimon Horman <horms@kernel.org>
Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
parent 2ae6e9a0
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -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;