projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7b4f36c
)
null_blk: Remove usage of the deprecated ida_simple_xx() API
author
Christophe JAILLET
<christophe.jaillet@wanadoo.fr>
Sun, 14 Jan 2024 09:00:59 +0000
(10:00 +0100)
committer
Jens Axboe
<axboe@kernel.dk>
Sun, 14 Jan 2024 14:37:44 +0000
(07:37 -0700)
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>
drivers/block/null_blk/main.c
patch
|
blob
|
history
diff --git
a/drivers/block/null_blk/main.c
b/drivers/block/null_blk/main.c
index 9f7695f00c2db8494a0230f2337a64d2fb4d3a14..36755f263e8ec03b1828bf44a05cc3b54bb6a03f 100644
(file)
--- 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_remov
e(&nullb_indexes, nullb->index);
+ ida_
fre
e(&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;