summaryrefslogtreecommitdiff
path: root/block/blk-core.c
diff options
context:
space:
mode:
authorBo Liu <liubo03@inspur.com>2022-06-15 04:18:16 -0400
committerJens Axboe <axboe@kernel.dk>2022-06-27 06:29:11 -0600
commit798f2a6f734de87633351c3ab13b17b07397cf68 (patch)
tree1022067154d4c5a375f6df20885fde7f631e8d5f /block/blk-core.c
parentbf8d08532bc19a14cfb54ae61099dccadefca446 (diff)
block: 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> Reviewed-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://lore.kernel.org/r/20220615081816.4342-1-liubo03@inspur.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-core.c')
-rw-r--r--block/blk-core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index 27fb1357ad4b..c2cec402d01c 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -435,7 +435,7 @@ struct request_queue *blk_alloc_queue(int node_id, bool alloc_srcu)
q->last_merge = NULL;
- q->id = ida_simple_get(&blk_queue_ida, 0, 0, GFP_KERNEL);
+ q->id = ida_alloc(&blk_queue_ida, GFP_KERNEL);
if (q->id < 0)
goto fail_srcu;
@@ -485,7 +485,7 @@ fail_stats:
fail_split:
bioset_exit(&q->bio_split);
fail_id:
- ida_simple_remove(&blk_queue_ida, q->id);
+ ida_free(&blk_queue_ida, q->id);
fail_srcu:
if (alloc_srcu)
cleanup_srcu_struct(q->srcu);