]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
vboxsf: Avoid an spurious warning if load_nls_xxx() fails
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Wed, 1 Nov 2023 10:49:48 +0000 (11:49 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Apr 2024 14:19:38 +0000 (16:19 +0200)
commit465abe8a7af489fd6c762257cdc0f07fa01124a3
treec6b387a857c7113f47ce824b686fe0699105f463
parent440e948cf0eff32cfe322dcbca3f2525354b159b
vboxsf: Avoid an spurious warning if load_nls_xxx() fails

commit de3f64b738af57e2732b91a0774facc675b75b54 upstream.

If an load_nls_xxx() function fails a few lines above, the 'sbi->bdi_id' is
still 0.
So, in the error handling path, we will call ida_simple_remove(..., 0)
which is not allocated yet.

In order to prevent a spurious "ida_free called for id=0 which is not
allocated." message, tweak the error handling path and add a new label.

Fixes: 0fd169576648 ("fs: Add VirtualBox guest shared folder (vboxsf) support")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/d09eaaa4e2e08206c58a1a27ca9b3e81dc168773.1698835730.git.christophe.jaillet@wanadoo.fr
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/vboxsf/super.c