mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-05-16 04:57:00 +00:00
netfilter: expect: Simplify the allocation of slab caches in nf_conntrack_expect_init
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> Signed-off-by: Florian Westphal <fw@strlen.de>
This commit is contained in:
parent
b0117d136b
commit
aa23cfe6ab
1 changed files with 1 additions and 3 deletions
|
@ -722,9 +722,7 @@ int nf_conntrack_expect_init(void)
|
||||||
nf_ct_expect_hsize = 1;
|
nf_ct_expect_hsize = 1;
|
||||||
}
|
}
|
||||||
nf_ct_expect_max = nf_ct_expect_hsize * 4;
|
nf_ct_expect_max = nf_ct_expect_hsize * 4;
|
||||||
nf_ct_expect_cachep = kmem_cache_create("nf_conntrack_expect",
|
nf_ct_expect_cachep = KMEM_CACHE(nf_conntrack_expect, 0);
|
||||||
sizeof(struct nf_conntrack_expect),
|
|
||||||
0, 0, NULL);
|
|
||||||
if (!nf_ct_expect_cachep)
|
if (!nf_ct_expect_cachep)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue