Commit 3472f639 authored by Keren Sun's avatar Keren Sun Committed by Andrew Morton
Browse files

mm: remove the non-useful else after a break in a if statement

Remove the else block since there is already a break in the statement of
if (iter->oom_lock), just set iter->oom_lock true after the if block ends.

Link: https://lkml.kernel.org/r/20241115235744.1419580-4-kerensun@google.com


Signed-off-by: default avatarKeren Sun <kerensun@google.com>
Reviewed-by: default avatarRoman Gushchin <roman.gushchin@linux.dev>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Shakeel Butt <shakeel.butt@linux.dev>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 91478b23
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1134,7 +1134,7 @@ static bool mem_cgroup_oom_trylock(struct mem_cgroup *memcg)
			failed = iter;
			mem_cgroup_iter_break(memcg, iter);
			break;
		} else
		}
		iter->oom_lock = true;
	}