All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm: Remove sysctl_extfrag_handler
@ 2019-01-04  3:25 Matthew Wilcox
  2019-01-04  3:29 ` Randy Dunlap
  0 siblings, 1 reply; 2+ messages in thread
From: Matthew Wilcox @ 2019-01-04  3:25 UTC (permalink / raw)
  To: Andrew Morton, linux-mm, Aditya Pakki, Mel Gorman; +Cc: Matthew Wilcox

The sysctl_extfrag_handler function 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.

Reported-by: Aditya Pakki <pakki001@umn.edu>
Signed-off-by: Matthew Wilcox <willy@infradead.org>
Acked-by: Mel Gorman <mgorman@techsingularity.net>
---
 include/linux/compaction.h | 2 --
 kernel/sysctl.c            | 2 +-
 mm/compaction.c            | 8 --------
 3 files changed, 1 insertion(+), 11 deletions(-)

diff --git a/include/linux/compaction.h b/include/linux/compaction.h
index 68250a57aace..70d0256edd31 100644
--- a/include/linux/compaction.h
+++ b/include/linux/compaction.h
@@ -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);
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 5fc724e4e454..e9c69247fc29 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -1439,7 +1439,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,
 	},
diff --git a/mm/compaction.c b/mm/compaction.c
index 7c607479de4a..80b941d9b6e7 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -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,
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-01-04  3:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-04  3:25 [PATCH] mm: Remove sysctl_extfrag_handler Matthew Wilcox
2019-01-04  3:29 ` Randy Dunlap

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.