diff options
author | Hongfu Li <lihongfu@kylinos.cn> | 2024-06-17 15:54:35 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2024-06-19 10:47:40 +0100 |
commit | 9f1f70dd850038b37e8b103ef0cc6f5eaeb6a8fc (patch) | |
tree | 16250bd0417503c7f3cbfbca2ee4dbaa2102dad3 /net/rds/tcp_recv.c | |
parent | 382d1741b5b2feffef7942dd074206372afe1a96 (diff) | |
download | lwn-9f1f70dd850038b37e8b103ef0cc6f5eaeb6a8fc.tar.gz lwn-9f1f70dd850038b37e8b103ef0cc6f5eaeb6a8fc.zip |
rds:Simplify the allocation of slab caches
Use the new KMEM_CACHE() macro instead of direct kmem_cache_create
to simplify the creation of SLAB caches.
Signed-off-by: Hongfu Li <lihongfu@kylinos.cn>
Reviewed-by: Zhu Yanjun <yanjun.zhu@linux.dev>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rds/tcp_recv.c')
-rw-r--r-- | net/rds/tcp_recv.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/rds/tcp_recv.c b/net/rds/tcp_recv.c index c00f04a1a534..7997a19d1da3 100644 --- a/net/rds/tcp_recv.c +++ b/net/rds/tcp_recv.c @@ -337,9 +337,7 @@ out: int rds_tcp_recv_init(void) { - rds_tcp_incoming_slab = kmem_cache_create("rds_tcp_incoming", - sizeof(struct rds_tcp_incoming), - 0, 0, NULL); + rds_tcp_incoming_slab = KMEM_CACHE(rds_tcp_incoming, 0); if (!rds_tcp_incoming_slab) return -ENOMEM; return 0; |