[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241104222737.298130-3-kerensun@google.com>
Date: Mon, 4 Nov 2024 14:27:35 -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 2/4] mm: Fix minor formatting issues for mm control
Add a line after declaration as it's missing after DEFINE_WAIT(),
replace the spaces with tabs for indent, and remove the non-useful else
after a break in a if statement.
Signed-off-by: Keren Sun <kerensun@...gle.com>
---
mm/memcontrol-v1.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/mm/memcontrol-v1.c b/mm/memcontrol-v1.c
index 3951538bd73f..5f9d3d6d443c 100644
--- a/mm/memcontrol-v1.c
+++ b/mm/memcontrol-v1.c
@@ -460,6 +460,7 @@ bool memcg1_wait_acct_move(struct mem_cgroup *memcg)
if (mc.moving_task && current != mc.moving_task) {
if (mem_cgroup_under_move(memcg)) {
DEFINE_WAIT(wait);
+
prepare_to_wait(&mc.waitq, &wait, TASK_INTERRUPTIBLE);
/* moving charge context might have finished. */
if (mc.moving_task)
@@ -490,7 +491,7 @@ void folio_memcg_lock(struct folio *folio)
* The RCU lock is held throughout the transaction. The fast
* path can get away without acquiring the memcg->move_lock
* because page moving starts with an RCU grace period.
- */
+ */
rcu_read_lock();
if (mem_cgroup_disabled())
@@ -2096,8 +2097,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.163.g1226f6d8fa-goog
Powered by blists - more mailing lists