zfs/module/os
Andrea Righi cb28c0b770 Linux 6.5 compat: safe cleanup in spl_proc_fini()
If we fail to create a proc entry in spl_proc_init() we may end up
calling unregister_sysctl_table() twice: one in the failure path of
spl_proc_init() and another time during spl_proc_fini().

Avoid the double call to unregister_sysctl_table() and while at it
refactor the code a bit to reduce code duplication.

This was accidentally introduced when the spl code was
updated for Linux 6.5 compatibility.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ameer Hamza <ahamza@ixsystems.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Closes #15234 
Closes #15235
2023-09-11 16:34:17 -07:00
..
freebsd Speed up WB_SYNC_NONE when a WB_SYNC_ALL occurs simultaneously 2023-06-05 10:59:02 -07:00
linux Linux 6.5 compat: safe cleanup in spl_proc_fini() 2023-09-11 16:34:17 -07:00