Remove register_sysctl() compatibility code
The register_sysctl() interface has been stable since Linux 2.6.21. There is no longer a need to maintain compatibility code. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
parent
bb4dee3df2
commit
b38bf6a4e3
@ -26,7 +26,6 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [
|
||||
SPL_AC_TYPE_ATOMIC64_CMPXCHG
|
||||
SPL_AC_TYPE_ATOMIC64_XCHG
|
||||
SPL_AC_TYPE_UINTPTR_T
|
||||
SPL_AC_2ARGS_REGISTER_SYSCTL
|
||||
SPL_AC_SHRINKER_CALLBACK
|
||||
SPL_AC_CTL_UNNUMBERED
|
||||
SPL_AC_CTL_NAME
|
||||
@ -872,25 +871,6 @@ AC_DEFUN([SPL_AC_TYPE_UINTPTR_T],
|
||||
])
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # 2.6.21 API change,
|
||||
dnl # 'register_sysctl_table' use only one argument instead of two
|
||||
dnl #
|
||||
AC_DEFUN([SPL_AC_2ARGS_REGISTER_SYSCTL],
|
||||
[AC_MSG_CHECKING([whether register_sysctl_table() wants 2 args])
|
||||
SPL_LINUX_TRY_COMPILE([
|
||||
#include <linux/sysctl.h>
|
||||
],[
|
||||
(void) register_sysctl_table(NULL, 0);
|
||||
],[
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_2ARGS_REGISTER_SYSCTL, 1,
|
||||
[register_sysctl_table() wants 2 args])
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
])
|
||||
|
||||
AC_DEFUN([SPL_AC_SHRINKER_CALLBACK],[
|
||||
tmp_flags="$EXTRA_KCFLAGS"
|
||||
EXTRA_KCFLAGS="-Werror"
|
||||
|
@ -27,15 +27,6 @@
|
||||
|
||||
#include <linux/proc_fs.h>
|
||||
|
||||
#ifdef CONFIG_SYSCTL
|
||||
#ifdef HAVE_2ARGS_REGISTER_SYSCTL
|
||||
#define spl_register_sysctl_table(t, a) register_sysctl_table(t, a)
|
||||
#else
|
||||
#define spl_register_sysctl_table(t, a) register_sysctl_table(t)
|
||||
#endif /* HAVE_2ARGS_REGISTER_SYSCTL */
|
||||
#define spl_unregister_sysctl_table(t) unregister_sysctl_table(t)
|
||||
#endif /* CONFIG_SYSCTL */
|
||||
|
||||
#ifdef HAVE_CTL_NAME
|
||||
#define CTL_NAME(cname) .ctl_name = (cname),
|
||||
#else
|
||||
|
@ -1127,7 +1127,7 @@ spl_proc_init(void)
|
||||
SENTRY;
|
||||
|
||||
#ifdef CONFIG_SYSCTL
|
||||
spl_header = spl_register_sysctl_table(spl_root, 0);
|
||||
spl_header = register_sysctl_table(spl_root);
|
||||
if (spl_header == NULL)
|
||||
SRETURN(-EUNATCH);
|
||||
#endif /* CONFIG_SYSCTL */
|
||||
@ -1160,7 +1160,7 @@ spl_proc_init(void)
|
||||
#endif
|
||||
remove_proc_entry("spl", NULL);
|
||||
#ifdef CONFIG_SYSCTL
|
||||
spl_unregister_sysctl_table(spl_header);
|
||||
unregister_sysctl_table(spl_header);
|
||||
#endif /* CONFIG_SYSCTL */
|
||||
}
|
||||
|
||||
@ -1181,7 +1181,7 @@ spl_proc_fini(void)
|
||||
|
||||
#ifdef CONFIG_SYSCTL
|
||||
ASSERT(spl_header != NULL);
|
||||
spl_unregister_sysctl_table(spl_header);
|
||||
unregister_sysctl_table(spl_header);
|
||||
#endif /* CONFIG_SYSCTL */
|
||||
|
||||
SEXIT;
|
||||
|
Loading…
Reference in New Issue
Block a user