Commit 7249c9f0 authored by Johannes Weiner's avatar Johannes Weiner Committed by Linus Torvalds

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/20191022201518.341216-1-hannes@cmpxchg.orgSigned-off-by: default avatarJohannes Weiner <hannes@cmpxchg.org>
Acked-by: default avatarMichal Hocko <mhocko@suse.com>
Cc: Vladimir Davydov <vdavydov.dev@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 9da83f3f
...@@ -6139,10 +6139,8 @@ static ssize_t memory_max_write(struct kernfs_open_file *of, ...@@ -6139,10 +6139,8 @@ static ssize_t memory_max_write(struct kernfs_open_file *of,
if (nr_pages <= max) if (nr_pages <= max)
break; break;
if (signal_pending(current)) { if (signal_pending(current))
err = -EINTR;
break; break;
}
if (!drained) { if (!drained) {
drain_all_stock(memcg); drain_all_stock(memcg);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment