summaryrefslogtreecommitdiffstats
path: root/block/blk-sysfs.c
diff options
context:
space:
mode:
authorBo Liu <liubo03@inspur.com>2022-06-15 10:18:16 +0200
committerJens Axboe <axboe@kernel.dk>2022-06-27 14:29:11 +0200
commit798f2a6f734de87633351c3ab13b17b07397cf68 (patch)
tree1022067154d4c5a375f6df20885fde7f631e8d5f /block/blk-sysfs.c
parentiomap: add support for dma aligned direct-io (diff)
downloadlinux-798f2a6f734de87633351c3ab13b17b07397cf68.tar.xz
linux-798f2a6f734de87633351c3ab13b17b07397cf68.zip
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-sysfs.c')
-rw-r--r--block/blk-sysfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c
index ec716ea26b92..69e53d1a4f0e 100644
--- a/block/blk-sysfs.c
+++ b/block/blk-sysfs.c
@@ -791,7 +791,7 @@ static void blk_release_queue(struct kobject *kobj)
if (blk_queue_has_srcu(q))
cleanup_srcu_struct(q->srcu);
- ida_simple_remove(&blk_queue_ida, q->id);
+ ida_free(&blk_queue_ida, q->id);
call_rcu(&q->rcu_head, blk_free_queue_rcu);
}