From: Keren Sun <kerensun@google.com>
To: akpm@linux-foundation.org
Cc: roman.gushchin@linux.dev, hannes@cmpxchg.org, mhocko@kernel.org,
shakeel.butt@linux.dev, muchun.song@linux.dev,
cgroups@vger.kernel.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, Keren Sun <kerensun@google.com>
Subject: [PATCH 2/4] mm: Fix minor formatting issues for mm control
Date: Mon, 4 Nov 2024 14:27:35 -0800 [thread overview]
Message-ID: <20241104222737.298130-3-kerensun@google.com> (raw)
In-Reply-To: <20241104222737.298130-1-kerensun@google.com>
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@google.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
next prev parent reply other threads:[~2024-11-04 22:28 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-04 22:27 [PATCH 0/4] mm: fix checkpatch.pl warnings in memcg v1 code Keren Sun
2024-11-04 22:27 ` [PATCH 1/4] mm: fix quoted strings spliting across lines Keren Sun
2024-11-05 1:55 ` Shakeel Butt
2024-11-05 21:23 ` Keren Sun
2024-11-04 22:27 ` Keren Sun [this message]
2024-11-05 16:29 ` [PATCH 2/4] mm: Fix minor formatting issues for mm control Shakeel Butt
2024-11-04 22:27 ` [PATCH 3/4] mm: Prefer 'unsigned int' to bare use of 'unsigned' Keren Sun
2024-11-05 16:31 ` Shakeel Butt
2024-11-04 22:27 ` [PATCH 4/4] mm: Replace simple_strtoul() with kstrtoul() Keren Sun
2024-11-05 4:39 ` kernel test robot
2024-11-05 5:00 ` kernel test robot
2024-11-05 6:44 ` kernel test robot
2024-11-05 16:38 ` Shakeel Butt
2024-11-05 19:56 ` Keren Sun
2024-11-07 17:20 ` Roman Gushchin
2024-11-07 17:49 ` Keren Sun
2024-11-05 0:31 ` [PATCH 0/4] mm: fix checkpatch.pl warnings in memcg v1 code Matthew Wilcox
2024-11-05 0:44 ` Roman Gushchin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241104222737.298130-3-kerensun@google.com \
--to=kerensun@google.com \
--cc=akpm@linux-foundation.org \
--cc=cgroups@vger.kernel.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=muchun.song@linux.dev \
--cc=roman.gushchin@linux.dev \
--cc=shakeel.butt@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox