-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Linux 6.5 compat: register_sysctl_table removed
Additionally, the .child element of ctl_table has been removed in 6.5. This change adds a new test for the pre-6.5 register_sysctl_table() function, and uses the old code in that case. If it isn't found, then the parentage entries in the tables are removed, and the register_sysctl call is provided the paths of "kernel/spl", "kernel/spl/kmem", and "kernel/spl/kstat" directly, to populate each subdirectory over three calls, as is the new API. Reviewed-by: Brian Atkinson <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Coleman Kane <[email protected]> Closes #15138
- Loading branch information
Showing
3 changed files
with
52 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
dnl # | ||
dnl # Linux 6.5 removes register_sysctl_table | ||
dnl # | ||
AC_DEFUN([ZFS_AC_KERNEL_SRC_REGISTER_SYSCTL_TABLE], [ | ||
ZFS_LINUX_TEST_SRC([has_register_sysctl_table], [ | ||
#include <linux/sysctl.h> | ||
static struct ctl_table dummy_table[] = { | ||
{} | ||
}; | ||
],[ | ||
struct ctl_table_header *h | ||
__attribute((unused)) = register_sysctl_table(dummy_table); | ||
]) | ||
]) | ||
|
||
AC_DEFUN([ZFS_AC_KERNEL_REGISTER_SYSCTL_TABLE], [ | ||
AC_MSG_CHECKING([whether register_sysctl_table exists]) | ||
ZFS_LINUX_TEST_RESULT([has_register_sysctl_table], [ | ||
AC_MSG_RESULT([yes]) | ||
AC_DEFINE(HAVE_REGISTER_SYSCTL_TABLE, 1, | ||
[register_sysctl_table exists]) | ||
],[ | ||
AC_MSG_RESULT([no]) | ||
]) | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters