Re: [PATCH v2] mm: memcontrol: eliminate redundant check in __mem_cgroup_insert_exceeded()

From: Johannes Weiner
Date: Mon Oct 12 2020 - 10:00:45 EST


On Mon, Oct 12, 2020 at 09:16:07AM -0400, Miaohe Lin wrote:
> 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.
>
> Acked-by: Michal Hocko <mhocko@xxxxxxxx>
> Signed-off-by: Miaohe Lin <linmiaohe@xxxxxxxxxx>

Looks good to me.

Acked-by: Johannes Weiner <hannes@xxxxxxxxxxx>