From 23b6f17abb83b4c9cedd26c9a80d0830373cd16f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= <nabijaczleweli@nabijaczleweli.xyz> Date: Sun, 11 Apr 2021 16:29:00 +0200 Subject: [PATCH] linux/spl: proc: use global table_{min,max} values instead of local ones MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia ZiemiaĆska <nabijaczleweli@nabijaczleweli.xyz> Closes #11879 --- module/os/linux/spl/spl-proc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/module/os/linux/spl/spl-proc.c b/module/os/linux/spl/spl-proc.c index 63cd7cc2e5bc..c4af27a7fcd7 100644 --- a/module/os/linux/spl/spl-proc.c +++ b/module/os/linux/spl/spl-proc.c @@ -59,13 +59,13 @@ proc_domemused(struct ctl_table *table, int write, void __user *buffer, size_t *lenp, loff_t *ppos) { int rc = 0; - unsigned long min = 0, max = ~0, val; + unsigned long val; spl_ctl_table dummy = *table; dummy.data = &val; dummy.proc_handler = &proc_dointvec; - dummy.extra1 = &min; - dummy.extra2 = &max; + dummy.extra1 = &table_min; + dummy.extra2 = &table_max; if (write) { *ppos += *lenp; @@ -87,14 +87,14 @@ proc_doslab(struct ctl_table *table, int write, void __user *buffer, size_t *lenp, loff_t *ppos) { int rc = 0; - unsigned long min = 0, max = ~0, val = 0, mask; + unsigned long val = 0, mask; spl_ctl_table dummy = *table; spl_kmem_cache_t *skc = NULL; dummy.data = &val; dummy.proc_handler = &proc_dointvec; - dummy.extra1 = &min; - dummy.extra2 = &max; + dummy.extra1 = &table_min; + dummy.extra2 = &table_max; if (write) { *ppos += *lenp;