Skip to contentSkip to conversation

mm: memcontrol: eliminate redundant check in __mem_cgroup_insert_exceeded()

PATCH linmiaohe 1 participant 1 message Oct 10, 2020

Subsystems (2)
lore
Share & tools
lore

linmiaohe

author
#0 lore raw
Quoted 6 lines · Michal Hocko
Quoted 5 lines · Miaohe Lin

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.

Quoted 6 lines
Quoted 1 line

I believe this is a result of a very unreadable code. Resp. the comment makes it hard to follow. It would be slightly better to simply drop the comment which doesn't really explain much IMHO.

Agree. Will do it in v2. Many thanks.