diff options
author | Kunwu Chan <chentao@kylinos.cn> | 2024-01-24 16:15:38 +0800 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2024-02-21 11:57:11 +0100 |
commit | aa23cfe6ab500dbbfa630602b403f433522daf9f (patch) | |
tree | 8060a90dffcd042c6661a7cc7e8898798944dbba /net/netfilter | |
parent | b0117d136bb9e4a1facb7ce354e0580dde876f6b (diff) | |
download | linux-aa23cfe6ab500dbbfa630602b403f433522daf9f.tar.gz linux-aa23cfe6ab500dbbfa630602b403f433522daf9f.tar.bz2 linux-aa23cfe6ab500dbbfa630602b403f433522daf9f.zip |
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>
Diffstat (limited to 'net/netfilter')
-rw-r--r-- | net/netfilter/nf_conntrack_expect.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/netfilter/nf_conntrack_expect.c b/net/netfilter/nf_conntrack_expect.c index 81ca348915c9..21fa550966f0 100644 --- a/net/netfilter/nf_conntrack_expect.c +++ b/net/netfilter/nf_conntrack_expect.c @@ -722,9 +722,7 @@ int nf_conntrack_expect_init(void) nf_ct_expect_hsize = 1; } nf_ct_expect_max = nf_ct_expect_hsize * 4; - nf_ct_expect_cachep = kmem_cache_create("nf_conntrack_expect", - sizeof(struct nf_conntrack_expect), - 0, 0, NULL); + nf_ct_expect_cachep = KMEM_CACHE(nf_conntrack_expect, 0); if (!nf_ct_expect_cachep) return -ENOMEM; |