Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

vboxsf: 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/b3c057c86b73f0309a6362031d21f4d7ebb60587.1698835730.git.christophe.jaillet@wanadoo.fr
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>

authored by

Christophe JAILLET and committed by
Hans de Goede
0141d68f de3f64b7

+3 -3
+3 -3
fs/vboxsf/super.c
··· 155 155 } 156 156 } 157 157 158 - sbi->bdi_id = ida_simple_get(&vboxsf_bdi_ida, 0, 0, GFP_KERNEL); 158 + sbi->bdi_id = ida_alloc(&vboxsf_bdi_ida, GFP_KERNEL); 159 159 if (sbi->bdi_id < 0) { 160 160 err = sbi->bdi_id; 161 161 goto fail_free; ··· 221 221 vboxsf_unmap_folder(sbi->root); 222 222 fail_free: 223 223 if (sbi->bdi_id >= 0) 224 - ida_simple_remove(&vboxsf_bdi_ida, sbi->bdi_id); 224 + ida_free(&vboxsf_bdi_ida, sbi->bdi_id); 225 225 if (sbi->nls) 226 226 unload_nls(sbi->nls); 227 227 fail_destroy_idr: ··· 269 269 270 270 vboxsf_unmap_folder(sbi->root); 271 271 if (sbi->bdi_id >= 0) 272 - ida_simple_remove(&vboxsf_bdi_ida, sbi->bdi_id); 272 + ida_free(&vboxsf_bdi_ida, sbi->bdi_id); 273 273 if (sbi->nls) 274 274 unload_nls(sbi->nls); 275 275