summaryrefslogtreecommitdiffstats
path: root/net/rds/connection.c
diff options
context:
space:
mode:
authorKunwu Chan <chentao@kylinos.cn>2024-01-24 15:58:01 +0800
committerJakub Kicinski <kuba@kernel.org>2024-01-30 17:08:19 -0800
commit047a7d261be652e0a8c756ac75936cc0dc537fc6 (patch)
tree2c0fe6c64a4ce6cae57692e7483c97aad0ae1d0f /net/rds/connection.c
parentd0005e76b73b095138cee9d662831761ffde84a8 (diff)
downloadlinux-047a7d261be652e0a8c756ac75936cc0dc537fc6.tar.gz
linux-047a7d261be652e0a8c756ac75936cc0dc537fc6.tar.bz2
linux-047a7d261be652e0a8c756ac75936cc0dc537fc6.zip
net: rds: Simplify the allocation of slab caches in rds_conn_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> Link: https://lore.kernel.org/r/20240124075801.471330-1-chentao@kylinos.cn Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/rds/connection.c')
-rw-r--r--net/rds/connection.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/rds/connection.c b/net/rds/connection.c
index b4cc699c5fad..c749c5525b40 100644
--- a/net/rds/connection.c
+++ b/net/rds/connection.c
@@ -829,9 +829,7 @@ int rds_conn_init(void)
if (ret)
return ret;
- rds_conn_slab = kmem_cache_create("rds_connection",
- sizeof(struct rds_connection),
- 0, 0, NULL);
+ rds_conn_slab = KMEM_CACHE(rds_connection, 0);
if (!rds_conn_slab) {
rds_loop_net_exit();
return -ENOMEM;