Skip to content

Commit 23b6f17

Browse files
nabijaczlewelibehlendorf
authored andcommitted
linux/spl: proc: use global table_{min,max} values instead of local ones
Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #11879
1 parent a0978d1 commit 23b6f17

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ proc_domemused(struct ctl_table *table, int write,
5959
void __user *buffer, size_t *lenp, loff_t *ppos)
6060
{
6161
int rc = 0;
62-
unsigned long min = 0, max = ~0, val;
62+
unsigned long val;
6363
spl_ctl_table dummy = *table;
6464

6565
dummy.data = &val;
6666
dummy.proc_handler = &proc_dointvec;
67-
dummy.extra1 = &min;
68-
dummy.extra2 = &max;
67+
dummy.extra1 = &table_min;
68+
dummy.extra2 = &table_max;
6969

7070
if (write) {
7171
*ppos += *lenp;
@@ -87,14 +87,14 @@ proc_doslab(struct ctl_table *table, int write,
8787
void __user *buffer, size_t *lenp, loff_t *ppos)
8888
{
8989
int rc = 0;
90-
unsigned long min = 0, max = ~0, val = 0, mask;
90+
unsigned long val = 0, mask;
9191
spl_ctl_table dummy = *table;
9292
spl_kmem_cache_t *skc = NULL;
9393

9494
dummy.data = &val;
9595
dummy.proc_handler = &proc_dointvec;
96-
dummy.extra1 = &min;
97-
dummy.extra2 = &max;
96+
dummy.extra1 = &table_min;
97+
dummy.extra2 = &table_max;
9898

9999
if (write) {
100100
*ppos += *lenp;

0 commit comments

Comments
 (0)