Skip to content

Commit 0141d68

Browse files
tititiou36jwrdegoede
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/b3c057c86b73f0309a6362031d21f4d7ebb60587.1698835730.git.christophe.jaillet@wanadoo.fr Reviewed-by: Hans de Goede <[email protected]> Signed-off-by: Hans de Goede <[email protected]>
1 parent de3f64b commit 0141d68

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

fs/vboxsf/super.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ static int vboxsf_fill_super(struct super_block *sb, struct fs_context *fc)
155155
}
156156
}
157157

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);
159159
if (sbi->bdi_id < 0) {
160160
err = sbi->bdi_id;
161161
goto fail_free;
@@ -221,7 +221,7 @@ static int vboxsf_fill_super(struct super_block *sb, struct fs_context *fc)
221221
vboxsf_unmap_folder(sbi->root);
222222
fail_free:
223223
if (sbi->bdi_id >= 0)
224-
ida_simple_remove(&vboxsf_bdi_ida, sbi->bdi_id);
224+
ida_free(&vboxsf_bdi_ida, sbi->bdi_id);
225225
if (sbi->nls)
226226
unload_nls(sbi->nls);
227227
fail_destroy_idr:
@@ -269,7 +269,7 @@ static void vboxsf_put_super(struct super_block *sb)
269269

270270
vboxsf_unmap_folder(sbi->root);
271271
if (sbi->bdi_id >= 0)
272-
ida_simple_remove(&vboxsf_bdi_ida, sbi->bdi_id);
272+
ida_free(&vboxsf_bdi_ida, sbi->bdi_id);
273273
if (sbi->nls)
274274
unload_nls(sbi->nls);
275275

0 commit comments

Comments
 (0)