aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/clnt.c
diff options
context:
space:
mode:
authorBo Liu <liubo03@inspur.com>2022-06-15 04:20:02 -0400
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2022-10-03 11:26:36 -0400
commit9947e57b22ddfb6f697fa45ef5c92d2aa17b2edf (patch)
tree3c379f6e9e2cdfc839c23230b1135e44dd717657 /net/sunrpc/clnt.c
parentf76349cf41451c5c42a99f18a9163377e4b364ff (diff)
downloadlinux-9947e57b22ddfb6f697fa45ef5c92d2aa17b2edf.tar.gz
SUNRPC: Directly use ida_alloc()/free()
Use ida_alloc()/ida_free() instead of ida_simple_get()/ida_simple_remove(). The latter is deprecated and more verbose. Signed-off-by: Bo Liu <liubo03@inspur.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'net/sunrpc/clnt.c')
-rw-r--r--net/sunrpc/clnt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index c284efa3d1efc2..4d8665f15dd7eb 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -345,7 +345,7 @@ static int rpc_alloc_clid(struct rpc_clnt *clnt)
{
int clid;
- clid = ida_simple_get(&rpc_clids, 0, 0, GFP_KERNEL);
+ clid = ida_alloc(&rpc_clids, GFP_KERNEL);
if (clid < 0)
return clid;
clnt->cl_clid = clid;
@@ -354,7 +354,7 @@ static int rpc_alloc_clid(struct rpc_clnt *clnt)
static void rpc_free_clid(struct rpc_clnt *clnt)
{
- ida_simple_remove(&rpc_clids, clnt->cl_clid);
+ ida_free(&rpc_clids, clnt->cl_clid);
}
static struct rpc_clnt * rpc_new_client(const struct rpc_create_args *args,