]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
mm: remove sysctl_extfrag_handler()
authorMatthew Wilcox <willy@infradead.org>
Tue, 5 Mar 2019 23:43:41 +0000 (15:43 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 6 Mar 2019 05:07:15 +0000 (21:07 -0800)
sysctl_extfrag_handler() neglects to propagate the return value from
proc_dointvec_minmax() to its caller.  It's a wrapper that doesn't need
to exist, so just use proc_dointvec_minmax() directly.

Link: http://lkml.kernel.org/r/20190104032557.3056-1-willy@infradead.org
Signed-off-by: Matthew Wilcox <willy@infradead.org>
Reported-by: Aditya Pakki <pakki001@umn.edu>
Acked-by: Mel Gorman <mgorman@techsingularity.net>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/compaction.h
kernel/sysctl.c
mm/compaction.c

index 68250a57aace9f017a6cfe3eaf0468a652100535..70d0256edd3149e61d53cd8e07de8195eba2940c 100644 (file)
@@ -88,8 +88,6 @@ extern int sysctl_compact_memory;
 extern int sysctl_compaction_handler(struct ctl_table *table, int write,
                        void __user *buffer, size_t *length, loff_t *ppos);
 extern int sysctl_extfrag_threshold;
-extern int sysctl_extfrag_handler(struct ctl_table *table, int write,
-                       void __user *buffer, size_t *length, loff_t *ppos);
 extern int sysctl_compact_unevictable_allowed;
 
 extern int fragmentation_index(struct zone *zone, unsigned int order);
index 7578e21a711b45c8ecddc86ae280c7965e177cac..9c78e06f7ba4a0c451879d64404337075afa8207 100644 (file)
@@ -1460,7 +1460,7 @@ static struct ctl_table vm_table[] = {
                .data           = &sysctl_extfrag_threshold,
                .maxlen         = sizeof(int),
                .mode           = 0644,
-               .proc_handler   = sysctl_extfrag_handler,
+               .proc_handler   = proc_dointvec_minmax,
                .extra1         = &min_extfrag_threshold,
                .extra2         = &max_extfrag_threshold,
        },
index ef29490b0f462349ec90b8672448f80627ef3af6..c15b4bbc9e9e0fdb1867b0abe247f20031ff16fe 100644 (file)
@@ -1876,14 +1876,6 @@ int sysctl_compaction_handler(struct ctl_table *table, int write,
        return 0;
 }
 
-int sysctl_extfrag_handler(struct ctl_table *table, int write,
-                       void __user *buffer, size_t *length, loff_t *ppos)
-{
-       proc_dointvec_minmax(table, write, buffer, length, ppos);
-
-       return 0;
-}
-
 #if defined(CONFIG_SYSFS) && defined(CONFIG_NUMA)
 static ssize_t sysfs_compact_node(struct device *dev,
                        struct device_attribute *attr,