Skip to content

Commit

Permalink
linux/spl: proc: use global table_{min,max} values instead of local ones
Browse files Browse the repository at this point in the history
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes #11879
  • Loading branch information
nabijaczleweli authored and behlendorf committed Apr 15, 2021
1 parent a0978d1 commit 23b6f17
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions module/os/linux/spl/spl-proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 23b6f17

Please sign in to comment.