From 9f1f70dd850038b37e8b103ef0cc6f5eaeb6a8fc Mon Sep 17 00:00:00 2001 From: Hongfu Li Date: Mon, 17 Jun 2024 15:54:35 +0800 Subject: 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 Reviewed-by: Zhu Yanjun Reviewed-by: Allison Henderson Signed-off-by: David S. Miller --- net/rds/tcp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'net/rds/tcp.c') diff --git a/net/rds/tcp.c b/net/rds/tcp.c index d8111ac83bb6..3dc6956f66f8 100644 --- a/net/rds/tcp.c +++ b/net/rds/tcp.c @@ -719,9 +719,7 @@ static int __init rds_tcp_init(void) { int ret; - rds_tcp_conn_slab = kmem_cache_create("rds_tcp_connection", - sizeof(struct rds_tcp_connection), - 0, 0, NULL); + rds_tcp_conn_slab = KMEM_CACHE(rds_tcp_connection, 0); if (!rds_tcp_conn_slab) { ret = -ENOMEM; goto out; -- cgit v1.2.3-58-ga151