All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] jbd2:remove unnecessary finish_wait call in jbd2_journal_wait_updates
@ 2026-08-03 11:10 shuo chen
  2026-08-03 16:30 ` [syzbot ci] " syzbot ci
  0 siblings, 1 reply; 2+ messages in thread
From: shuo chen @ 2026-08-03 11:10 UTC (permalink / raw)
  To: linux-ext4

merge transaction and atomic_read(&transaction->t_updates) check.
remove redundant finish_wait call.

Signed-off-by: shuo chen <1289151713@qq.com>
---
 fs/jbd2/transaction.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c
index 5cc7d097b2ac..0f193d02a054 100644
--- a/fs/jbd2/transaction.c
+++ b/fs/jbd2/transaction.c
@@ -831,15 +831,12 @@ void jbd2_journal_wait_updates(journal_t *journal)
 		 */
 		transaction_t *transaction = journal->j_running_transaction;
 
-		if (!transaction)
+		if (!transaction || !atomic_read(&transaction->t_updates))
 			break;
 
 		prepare_to_wait(&journal->j_wait_updates, &wait,
 				TASK_UNINTERRUPTIBLE);
-		if (!atomic_read(&transaction->t_updates)) {
-			finish_wait(&journal->j_wait_updates, &wait);
-			break;
-		}
+
 		write_unlock(&journal->j_state_lock);
 		schedule();
 		finish_wait(&journal->j_wait_updates, &wait);
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-08-03 16:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-03 11:10 [PATCH] jbd2:remove unnecessary finish_wait call in jbd2_journal_wait_updates shuo chen
2026-08-03 16:30 ` [syzbot ci] " syzbot ci

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.