Linux-mm Archive on
 help / color / Atom feed
* [patch 019/158] mm: memcontrol: remove dead code from memory_max_write()
@ 2019-12-01  1:50 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2019-12-01  1:50 UTC (permalink / raw)
  To: akpm, hannes, linux-mm, mhocko, mm-commits, torvalds,

From: Johannes Weiner <>
Subject: mm: memcontrol: remove dead code from memory_max_write()

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 <>
Acked-by: Michal Hocko <>
Cc: Vladimir Davydov <>
Signed-off-by: Andrew Morton <>

 mm/memcontrol.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

--- a/mm/memcontrol.c~mm-memcontrol-remove-dead-code-from-memory_max_write
+++ a/mm/memcontrol.c
@@ -6139,10 +6139,8 @@ static ssize_t memory_max_write(struct k
 		if (nr_pages <= max)
-		if (signal_pending(current)) {
-			err = -EINTR;
+		if (signal_pending(current))
-		}
 		if (!drained) {

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-01  1:50 [patch 019/158] mm: memcontrol: remove dead code from memory_max_write() akpm

Linux-mm Archive on

Archives are clonable:
	git clone --mirror linux-mm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mm linux-mm/ \
	public-inbox-index linux-mm

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone