mm: memcontrol: eliminate redundant check in __mem_cgroup_insert_exceeded()
Subsystems (2)
Quoted 6 lines · Michal Hocko
Quoted 5 lines · Miaohe Lin
The
mz->usage_in_excess>=mz_node->usage_in_excesscheck is exactly the else case ofmz->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
Signed-off-by Miaohe Lin <[email protected]>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.