linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] mm: memcontrol: remove dead code from memory_max_write()
@ 2019-10-22 20:15 Johannes Weiner
  2019-10-22 20:15 ` [PATCH 2/2] mm: memcontrol: try harder to set a new memory.high Johannes Weiner
  2019-10-23  6:50 ` [PATCH 1/2] mm: memcontrol: remove dead code from memory_max_write() Michal Hocko
  0 siblings, 2 replies; 6+ messages in thread
From: Johannes Weiner @ 2019-10-22 20:15 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Michal Hocko, linux-mm, cgroups, linux-kernel, kernel-team

When the reclaim loop in memory_max_write() is ^C'd or similar, we set
err to -EINTR. But we don't return err. Once the limit is set, we
always return success (nbytes). Delete the dead code.

Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
---
 mm/memcontrol.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 055975b0b3a3..ff90d4e7df37 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -6122,10 +6122,8 @@ static ssize_t memory_max_write(struct kernfs_open_file *of,
 		if (nr_pages <= max)
 			break;
 
-		if (signal_pending(current)) {
-			err = -EINTR;
+		if (signal_pending(current))
 			break;
-		}
 
 		if (!drained) {
 			drain_all_stock(memcg);
-- 
2.23.0



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

end of thread, other threads:[~2019-10-24  8:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-22 20:15 [PATCH 1/2] mm: memcontrol: remove dead code from memory_max_write() Johannes Weiner
2019-10-22 20:15 ` [PATCH 2/2] mm: memcontrol: try harder to set a new memory.high Johannes Weiner
2019-10-23  6:59   ` Michal Hocko
2019-10-23 17:57     ` Johannes Weiner
2019-10-24  8:24       ` Michal Hocko
2019-10-23  6:50 ` [PATCH 1/2] mm: memcontrol: remove dead code from memory_max_write() Michal Hocko

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).