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>
This commit is contained in:
parent
de3f64b738
commit
0141d68f86
|
@ -155,7 +155,7 @@ static int vboxsf_fill_super(struct super_block *sb, struct fs_context *fc)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sbi->bdi_id = ida_simple_get(&vboxsf_bdi_ida, 0, 0, GFP_KERNEL);
|
sbi->bdi_id = ida_alloc(&vboxsf_bdi_ida, GFP_KERNEL);
|
||||||
if (sbi->bdi_id < 0) {
|
if (sbi->bdi_id < 0) {
|
||||||
err = sbi->bdi_id;
|
err = sbi->bdi_id;
|
||||||
goto fail_free;
|
goto fail_free;
|
||||||
|
@ -221,7 +221,7 @@ fail_unmap:
|
||||||
vboxsf_unmap_folder(sbi->root);
|
vboxsf_unmap_folder(sbi->root);
|
||||||
fail_free:
|
fail_free:
|
||||||
if (sbi->bdi_id >= 0)
|
if (sbi->bdi_id >= 0)
|
||||||
ida_simple_remove(&vboxsf_bdi_ida, sbi->bdi_id);
|
ida_free(&vboxsf_bdi_ida, sbi->bdi_id);
|
||||||
if (sbi->nls)
|
if (sbi->nls)
|
||||||
unload_nls(sbi->nls);
|
unload_nls(sbi->nls);
|
||||||
fail_destroy_idr:
|
fail_destroy_idr:
|
||||||
|
@ -269,7 +269,7 @@ static void vboxsf_put_super(struct super_block *sb)
|
||||||
|
|
||||||
vboxsf_unmap_folder(sbi->root);
|
vboxsf_unmap_folder(sbi->root);
|
||||||
if (sbi->bdi_id >= 0)
|
if (sbi->bdi_id >= 0)
|
||||||
ida_simple_remove(&vboxsf_bdi_ida, sbi->bdi_id);
|
ida_free(&vboxsf_bdi_ida, sbi->bdi_id);
|
||||||
if (sbi->nls)
|
if (sbi->nls)
|
||||||
unload_nls(sbi->nls);
|
unload_nls(sbi->nls);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue