WSL2-Linux-Kernel/fs/vboxsf
Christophe JAILLET 465abe8a7a 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: 0fd1695766 ("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>
2024-04-10 16:19:38 +02:00
..
Kconfig
Makefile
dir.c vboxsf: Add support for the atomic_open directory-inode op 2021-06-23 14:36:52 +02:00
file.c vboxsf: Add vboxsf_[create|release]_sf_handle() helpers 2021-06-23 14:36:46 +02:00
shfl_hostintf.h
super.c vboxsf: Avoid an spurious warning if load_nls_xxx() fails 2024-04-10 16:19:38 +02:00
utils.c vboxsf: don't allow to change the inode type 2021-03-12 22:15:00 -05:00
vboxsf_wrappers.c
vfsmod.h vboxsf: Add vboxsf_[create|release]_sf_handle() helpers 2021-06-23 14:36:46 +02:00