[PATCH 2/4] jbd2: make kjournald2 commit wait freezable

From: Dai Junbing

Date: Wed May 27 2026 - 02:53:14 EST


While waiting for commit work, kjournald2 may be woken during suspend
and resume due to freezer state transitions. This causes avoidable CPU
activity in the suspend/resume path and adds unnecessary power overhead.

Make the commit wait freezable so the thread is not unnecessarily woken
by the freezer during suspend/resume.

Signed-off-by: Dai Junbing <daijunbing@xxxxxxxx>
---
fs/jbd2/journal.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
index 4f397fcdb13c..d7ffe60c8793 100644
--- a/fs/jbd2/journal.c
+++ b/fs/jbd2/journal.c
@@ -222,7 +222,7 @@ static int kjournald2(void *arg)
DEFINE_WAIT(wait);

prepare_to_wait(&journal->j_wait_commit, &wait,
- TASK_INTERRUPTIBLE);
+ TASK_INTERRUPTIBLE|TASK_FREEZABLE);
transaction = journal->j_running_transaction;
if (transaction == NULL ||
time_before(jiffies, transaction->t_expires)) {
--
2.25.1