diff options
author | Bo Liu <liubo03@inspur.com> | 2022-06-15 10:20:02 +0200 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2022-10-03 17:26:36 +0200 |
commit | 9947e57b22ddfb6f697fa45ef5c92d2aa17b2edf (patch) | |
tree | 3c379f6e9e2cdfc839c23230b1135e44dd717657 /net/sunrpc/xprtmultipath.c | |
parent | Linux 6.0-rc7 (diff) | |
download | linux-9947e57b22ddfb6f697fa45ef5c92d2aa17b2edf.tar.xz linux-9947e57b22ddfb6f697fa45ef5c92d2aa17b2edf.zip |
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.c | 4 |
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); } /** |