aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Weiner <[email protected]>2019-11-30 17:50:06 -0800
committerLinus Torvalds <[email protected]>2019-12-01 06:29:18 -0800
commit7249c9f01da30ae5cd1843a54a8fab9b35dd979d (patch)
treea7882212d00ba8c033c0511fcf7ea55bcdad45a5
parent9da83f3fc74b806ee419a29977ef0239454bd8ec (diff)
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. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Johannes Weiner <[email protected]> Acked-by: Michal Hocko <[email protected]> Cc: Vladimir Davydov <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r--mm/memcontrol.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 2788fd5870bc..2bd6d470c5f1 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -6139,10 +6139,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);