summaryrefslogtreecommitdiff
path: root/net/sunrpc/xprtmultipath.c
diff options
context:
space:
mode:
authorBo Liu <liubo03@inspur.com>2022-06-15 11:20:02 +0300
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2022-10-03 18:26:36 +0300
commit9947e57b22ddfb6f697fa45ef5c92d2aa17b2edf (patch)
tree3c379f6e9e2cdfc839c23230b1135e44dd717657 /net/sunrpc/xprtmultipath.c
parentf76349cf41451c5c42a99f18a9163377e4b364ff (diff)
downloadlinux-9947e57b22ddfb6f697fa45ef5c92d2aa17b2edf.tar.xz
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/xprtmultipath.c')
-rw-r--r--net/sunrpc/xprtmultipath.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sunrpc/xprtmultipath.c b/net/sunrpc/xprtmultipath.c
index 685db598acbe..701250b305db 100644
--- a/net/sunrpc/xprtmultipath.c
+++ b/net/sunrpc/xprtmultipath.c
@@ -103,7 +103,7 @@ static int xprt_switch_alloc_id(struct rpc_xprt_switch *xps, gfp_t gfp_flags)
{
int id;
- id = ida_simple_get(&rpc_xprtswitch_ids, 0, 0, gfp_flags);
+ id = ida_alloc(&rpc_xprtswitch_ids, gfp_flags);
if (id < 0)
return id;
@@ -113,7 +113,7 @@ static int xprt_switch_alloc_id(struct rpc_xprt_switch *xps, gfp_t gfp_flags)
static void xprt_switch_free_id(struct rpc_xprt_switch *xps)
{
- ida_simple_remove(&rpc_xprtswitch_ids, xps->xps_id);
+ ida_free(&rpc_xprtswitch_ids, xps->xps_id);
}
/**