diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2024-01-14 10:00:59 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2024-01-14 07:37:44 -0700 |
commit | 95931a245b44ee04f3359ec432e73614d44d8b38 (patch) | |
tree | 2c78048d6feafd00a5fa3468e336530e3b271912 /drivers | |
parent | 7b4f36cd22a65b750b4cb6ac14804fb7d6e6c67d (diff) | |
download | linux-95931a245b44ee04f3359ec432e73614d44d8b38.tar.gz linux-95931a245b44ee04f3359ec432e73614d44d8b38.tar.bz2 linux-95931a245b44ee04f3359ec432e73614d44d8b38.zip |
null_blk: Remove usage of the deprecated ida_simple_xx() API
ida_alloc() and ida_free() should be preferred to the deprecated
ida_simple_get() and ida_simple_remove().
This is less verbose.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/bf257b1078475a415cdc3344c6a750842946e367.1705222845.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/block/null_blk/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/block/null_blk/main.c b/drivers/block/null_blk/main.c index 9f7695f00c2d..36755f263e8e 100644 --- a/drivers/block/null_blk/main.c +++ b/drivers/block/null_blk/main.c @@ -1840,7 +1840,7 @@ static void null_del_dev(struct nullb *nullb) dev = nullb->dev; - ida_simple_remove(&nullb_indexes, nullb->index); + ida_free(&nullb_indexes, nullb->index); list_del_init(&nullb->list); @@ -2174,7 +2174,7 @@ static int null_add_dev(struct nullb_device *dev) blk_queue_flag_set(QUEUE_FLAG_NONROT, nullb->q); mutex_lock(&lock); - rv = ida_simple_get(&nullb_indexes, 0, 0, GFP_KERNEL); + rv = ida_alloc(&nullb_indexes, GFP_KERNEL); if (rv < 0) { mutex_unlock(&lock); goto out_cleanup_zone; |