Skip to content

Commit 3a68f3c

Browse files
bwatkinsonbehlendorf
authored andcommitted
Revert "Linux 6.5 compat: register_sysctl_table removed"
This reverts commit b35374f as there are error messages when loading the SPL module. Errors seemed to be tied to duplicate a duplicate entry. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Brian Atkinson <[email protected]> Closes #15134
1 parent 8be6308 commit 3a68f3c

File tree

3 files changed

+3
-52
lines changed

3 files changed

+3
-52
lines changed

config/kernel-register_sysctl_table.m4

Lines changed: 0 additions & 27 deletions
This file was deleted.

config/kernel.m4

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,6 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [
160160
ZFS_AC_KERNEL_SRC_FILEMAP
161161
ZFS_AC_KERNEL_SRC_WRITEPAGE_T
162162
ZFS_AC_KERNEL_SRC_RECLAIMED
163-
ZFS_AC_KERNEL_SRC_REGISTER_SYSCTL_TABLE
164163
case "$host_cpu" in
165164
powerpc*)
166165
ZFS_AC_KERNEL_SRC_CPU_HAS_FEATURE
@@ -300,7 +299,6 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_RESULT], [
300299
ZFS_AC_KERNEL_FILEMAP
301300
ZFS_AC_KERNEL_WRITEPAGE_T
302301
ZFS_AC_KERNEL_RECLAIMED
303-
ZFS_AC_KERNEL_REGISTER_SYSCTL_TABLE
304302
case "$host_cpu" in
305303
powerpc*)
306304
ZFS_AC_KERNEL_CPU_HAS_FEATURE

module/os/linux/spl/spl-proc.c

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,6 @@ static struct ctl_table spl_table[] = {
624624
.mode = 0644,
625625
.proc_handler = &proc_dohostid,
626626
},
627-
#ifdef HAVE_REGISTER_SYSCTL_TABLE
628627
{
629628
.procname = "kmem",
630629
.mode = 0555,
@@ -635,11 +634,9 @@ static struct ctl_table spl_table[] = {
635634
.mode = 0555,
636635
.child = spl_kstat_table,
637636
},
638-
#endif
639637
{},
640638
};
641639

642-
#ifdef HAVE_REGISTER_SYSCTL_TABLE
643640
static struct ctl_table spl_dir[] = {
644641
{
645642
.procname = "spl",
@@ -651,38 +648,21 @@ static struct ctl_table spl_dir[] = {
651648

652649
static struct ctl_table spl_root[] = {
653650
{
654-
.procname = "kernel",
655-
.mode = 0555,
656-
.child = spl_dir,
651+
.procname = "kernel",
652+
.mode = 0555,
653+
.child = spl_dir,
657654
},
658655
{}
659656
};
660-
#endif
661657

662658
int
663659
spl_proc_init(void)
664660
{
665661
int rc = 0;
666662

667-
#ifdef HAVE_REGISTER_SYSCTL_TABLE
668663
spl_header = register_sysctl_table(spl_root);
669664
if (spl_header == NULL)
670665
return (-EUNATCH);
671-
#else
672-
spl_header = register_sysctl("kernel/spl", spl_table);
673-
if (spl_header == NULL)
674-
return (-EUNATCH);
675-
676-
if (register_sysctl("kernel/spl/kmem", spl_kmem_table) == NULL) {
677-
rc = -EUNATCH;
678-
goto out;
679-
}
680-
681-
if (register_sysctl("kernel/spl/kstat", spl_kstat_table) == NULL) {
682-
rc = -EUNATCH;
683-
goto out;
684-
}
685-
#endif
686666

687667
proc_spl = proc_mkdir("spl", NULL);
688668
if (proc_spl == NULL) {

0 commit comments

Comments
 (0)