]> git.baikalelectronics.ru Git - kernel.git/commitdiff
s390/mm: use shared variables for sysctl range check
authorVasily Gorbik <gor@linux.ibm.com>
Tue, 25 Jun 2019 22:00:42 +0000 (00:00 +0200)
committerHeiko Carstens <heiko.carstens@de.ibm.com>
Fri, 26 Jul 2019 11:36:22 +0000 (13:36 +0200)
Since commit 00dd6b67df9f ("proc/sysctl: add shared variables for range
check") special shared variables are available for sysctl range check.
Reuse them for /proc/sys/vm/allocate_pgste proc handler.

Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
arch/s390/mm/pgalloc.c

index 99e06213a22b7c259ba90831c4cf7cbda6d1a301..54fcdf66ae967c4546bb6c39933de43ac164150a 100644 (file)
@@ -17,8 +17,6 @@
 
 #ifdef CONFIG_PGSTE
 
-static int page_table_allocate_pgste_min = 0;
-static int page_table_allocate_pgste_max = 1;
 int page_table_allocate_pgste = 0;
 EXPORT_SYMBOL(page_table_allocate_pgste);
 
@@ -29,8 +27,8 @@ static struct ctl_table page_table_sysctl[] = {
                .maxlen         = sizeof(int),
                .mode           = S_IRUGO | S_IWUSR,
                .proc_handler   = proc_dointvec_minmax,
-               .extra1         = &page_table_allocate_pgste_min,
-               .extra2         = &page_table_allocate_pgste_max,
+               .extra1         = SYSCTL_ZERO,
+               .extra2         = SYSCTL_ONE,
        },
        { }
 };