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

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


Signed-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
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -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);