From: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx> [ Upstream commit 95931a245b44ee04f3359ec432e73614d44d8b38 ] 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@xxxxxxxxxx> Link: https://lore.kernel.org/r/bf257b1078475a415cdc3344c6a750842946e367.1705222845.git.christophe.jaillet@xxxxxxxxxx Signed-off-by: Jens Axboe <axboe@xxxxxxxxx> (cherry picked from commit 95931a245b44ee04f3359ec432e73614d44d8b38) [Harshit: backport to 6.6.y] Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@xxxxxxxxxx> Signed-off-by: Vegard Nossum <vegard.nossum@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/block/null_blk/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/block/null_blk/main.c +++ b/drivers/block/null_blk/main.c @@ -1819,7 +1819,7 @@ static void null_del_dev(struct nullb *n dev = nullb->dev; - ida_simple_remove(&nullb_indexes, nullb->index); + ida_free(&nullb_indexes, nullb->index); list_del_init(&nullb->list); @@ -2154,7 +2154,7 @@ static int null_add_dev(struct nullb_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; Patches currently in stable-queue which might be from vegard.nossum@xxxxxxxxxx are queue-6.6/drm-bridge-adv7511-fix-crash-on-irq-during-probe.patch queue-6.6/null_blk-fix-null-ptr-dereference-while-configuring-power-and-submit_queues.patch queue-6.6/netfilter-nf_tables-restore-set-elements-when-delete-set-fails.patch queue-6.6/iommufd-fix-protection-fault-in-iommufd_test_syz_conv_iova.patch queue-6.6/netfilter-nf_tables-fix-memleak-in-map-from-abort-path.patch queue-6.6/platform-x86-think-lmi-fix-password-opcode-ordering-for-workstations.patch queue-6.6/net-dsa-fix-netdev_priv-dereference-before-check-on-non-dsa-netdevice-events.patch queue-6.6/net-stmmac-move-the-est-lock-to-struct-stmmac_priv.patch queue-6.6/null_blk-remove-usage-of-the-deprecated-ida_simple_xx-api.patch queue-6.6/ubifs-ubifs_symlink-fix-memleak-of-inode-i_link-in-error-path.patch queue-6.6/efi-unaccepted-touch-soft-lockup-during-memory-accept.patch