Skip to content

Commit b2b0220

Browse files
tititiou36gregkh
authored andcommitted
null_blk: Remove usage of the deprecated ida_simple_xx() API
[ Upstream commit 95931a2 ] 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 <[email protected]> Link: https://lore.kernel.org/r/bf257b1078475a415cdc3344c6a750842946e367.1705222845.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jens Axboe <[email protected]> (cherry picked from commit 95931a2) [Harshit: backport to 6.6.y] Signed-off-by: Harshit Mogalapalli <[email protected]> Signed-off-by: Vegard Nossum <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 2deb10a commit b2b0220

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/block/null_blk/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1819,7 +1819,7 @@ static void null_del_dev(struct nullb *nullb)
18191819

18201820
dev = nullb->dev;
18211821

1822-
ida_simple_remove(&nullb_indexes, nullb->index);
1822+
ida_free(&nullb_indexes, nullb->index);
18231823

18241824
list_del_init(&nullb->list);
18251825

@@ -2154,7 +2154,7 @@ static int null_add_dev(struct nullb_device *dev)
21542154
blk_queue_flag_set(QUEUE_FLAG_NONROT, nullb->q);
21552155

21562156
mutex_lock(&lock);
2157-
rv = ida_simple_get(&nullb_indexes, 0, 0, GFP_KERNEL);
2157+
rv = ida_alloc(&nullb_indexes, GFP_KERNEL);
21582158
if (rv < 0) {
21592159
mutex_unlock(&lock);
21602160
goto out_cleanup_zone;

0 commit comments

Comments
 (0)