linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: compaction.c: Propagate return value upstream
@ 2018-12-26 19:42 Aditya Pakki
  2018-12-27  3:50 ` Matthew Wilcox
  0 siblings, 1 reply; 6+ messages in thread
From: Aditya Pakki @ 2018-12-26 19:42 UTC (permalink / raw)
  To: pakki001
  Cc: kjlu, Andrew Morton, Michal Hocko, Vlastimil Babka, Joonsoo Kim,
	David Rientjes, Yang Shi, Johannes Weiner, Joe Perches, linux-mm,
	linux-kernel

In sysctl_extfrag_handler(), proc_dointvec_minmax() can return an
error. The fix propagates the error upstream in case of failure.

Signed-off-by: Aditya Pakki <pakki001@umn.edu>
---
 mm/compaction.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/mm/compaction.c b/mm/compaction.c
index 7c607479de4a..d108974d0867 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -1879,9 +1879,7 @@ int sysctl_compaction_handler(struct ctl_table *table, int write,
 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;
+	return proc_dointvec_minmax(table, write, buffer, length, ppos);
 }
 
 #if defined(CONFIG_SYSFS) && defined(CONFIG_NUMA)
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread
* [PATCH] mm: compaction.c: Propagate return value upstream
@ 2018-12-26 19:07 Aditya Pakki
  2018-12-26 19:11 ` Matthew Wilcox
  0 siblings, 1 reply; 6+ messages in thread
From: Aditya Pakki @ 2018-12-26 19:07 UTC (permalink / raw)
  To: pakki001
  Cc: kjlu, Andrew Morton, Vlastimil Babka, Michal Hocko,
	David Rientjes, Joonsoo Kim, Yang Shi, Johannes Weiner,
	Joe Perches, linux-mm, linux-kernel

In sysctl_extfrag_handler(), proc_dointvec_minmax() can return an
error. The fix propagates the error upstream in case of failure.

Signed-off-by: Aditya Pakki <pakki001@umn.edu>
---
 mm/compaction.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/mm/compaction.c b/mm/compaction.c
index 7c607479de4a..5703b4051796 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -1879,9 +1879,8 @@ int sysctl_compaction_handler(struct ctl_table *table, int write,
 int sysctl_extfrag_handler(struct ctl_table *table, int write,
 			void __user *buffer, size_t *length, loff_t *ppos)
 {
+	return
 	proc_dointvec_minmax(table, write, buffer, length, ppos);
-
-	return 0;
 }
 
 #if defined(CONFIG_SYSFS) && defined(CONFIG_NUMA)
-- 
2.17.1


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

end of thread, other threads:[~2019-01-02 12:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-26 19:42 [PATCH] mm: compaction.c: Propagate return value upstream Aditya Pakki
2018-12-27  3:50 ` Matthew Wilcox
2018-12-27 16:44   ` Randy Dunlap
2019-01-02 12:24   ` Mel Gorman
  -- strict thread matches above, loose matches on Subject: below --
2018-12-26 19:07 Aditya Pakki
2018-12-26 19:11 ` Matthew Wilcox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).