[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241115235744.1419580-4-kerensun@google.com>
Date: Fri, 15 Nov 2024 15:57:44 -0800
From: Keren Sun <kerensun@...gle.com>
To: akpm@...ux-foundation.org
Cc: roman.gushchin@...ux.dev, hannes@...xchg.org, mhocko@...nel.org,
shakeel.butt@...ux.dev, muchun.song@...ux.dev, cgroups@...r.kernel.org,
linux-mm@...ck.org, linux-kernel@...r.kernel.org,
Keren Sun <kerensun@...gle.com>
Subject: [PATCH 3/3] 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.
Signed-off-by: Keren Sun <kerensun@...gle.com>
---
mm/memcontrol-v1.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/memcontrol-v1.c b/mm/memcontrol-v1.c
index 4cbbced0c8a1..423c861acdd8 100644
--- a/mm/memcontrol-v1.c
+++ b/mm/memcontrol-v1.c
@@ -1148,8 +1148,8 @@ static bool mem_cgroup_oom_trylock(struct mem_cgroup *memcg)
failed = iter;
mem_cgroup_iter_break(memcg, iter);
break;
- } else
- iter->oom_lock = true;
+ }
+ iter->oom_lock = true;
}
if (failed) {
--
2.47.0.338.g60cca15819-goog
Powered by blists - more mailing lists