mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-30 15:44:13 +08:00
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>
This commit is contained in:
parent
2ae6e9a03d
commit
d5f9142fb9
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user