diff --git a/module/os/linux/spl/spl-proc.c b/module/os/linux/spl/spl-proc.c index 9af192274733..215d4c496c8a 100644 --- a/module/os/linux/spl/spl-proc.c +++ b/module/os/linux/spl/spl-proc.c @@ -51,6 +51,10 @@ typedef struct ctl_table spl_ctl_table; #define CONST_CTL_TABLE struct ctl_table #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 11, 0) +#define PROC_USE_SENTINELS +#endif + static unsigned long table_min = 0; static unsigned long table_max = ~0; @@ -359,11 +363,15 @@ static struct ctl_table spl_kmem_table[] = { .mode = 0444, .proc_handler = &proc_doslab, }, +#ifdef PROC_USE_SENTINELS {}, +#endif }; static struct ctl_table spl_kstat_table[] = { +#ifdef PROC_USE_SENTINELS {}, +#endif }; static struct ctl_table spl_table[] = { @@ -397,7 +405,9 @@ static struct ctl_table spl_table[] = { .child = spl_kstat_table, }, #endif +#ifdef PROC_USE_SENTINELS {}, +#endif }; #ifdef HAVE_REGISTER_SYSCTL_TABLE @@ -407,7 +417,9 @@ static struct ctl_table spl_dir[] = { .mode = 0555, .child = spl_table, }, +#ifdef PROC_USE_SENTINELS {} +#endif }; static struct ctl_table spl_root[] = { @@ -416,7 +428,9 @@ static struct ctl_table spl_root[] = { .mode = 0555, .child = spl_dir, }, +#ifdef PROC_USE_SENTINELS {} +#endif }; #endif