]> git.baikalelectronics.ru Git - kernel.git/commit
mm: memcontrol: eliminate redundant check in __mem_cgroup_insert_exceeded()
authorMiaohe Lin <linmiaohe@huawei.com>
Tue, 15 Dec 2020 03:06:28 +0000 (19:06 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 15 Dec 2020 20:13:39 +0000 (12:13 -0800)
commite49cee590be74cc9178990d394eab61cb8cdea91
treea5dbcf1c3407f68469924b61c2f2d46e89e58a4d
parent0b9e2996f4c83d42ff3d3c65d8c404a735107f9e
mm: memcontrol: eliminate redundant check in __mem_cgroup_insert_exceeded()

The mz->usage_in_excess >= mz_node->usage_in_excess check is exactly the
else case of mz->usage_in_excess < mz_node->usage_in_excess.  So we could
replace else if (mz->usage_in_excess >= mz_node->usage_in_excess) with
else equally.  Also drop the comment which doesn't really explain much.

Link: https://lkml.kernel.org/r/20201012131607.10656-1-linmiaohe@huawei.com
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memcontrol.c