aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/jbd2/transaction.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c
index a0e41a4c080e..35ae096bed5d 100644
--- a/fs/jbd2/transaction.c
+++ b/fs/jbd2/transaction.c
@@ -517,12 +517,13 @@ void jbd2_journal_lock_updates(journal_t *journal)
517 break; 517 break;
518 518
519 spin_lock(&transaction->t_handle_lock); 519 spin_lock(&transaction->t_handle_lock);
520 prepare_to_wait(&journal->j_wait_updates, &wait,
521 TASK_UNINTERRUPTIBLE);
520 if (!atomic_read(&transaction->t_updates)) { 522 if (!atomic_read(&transaction->t_updates)) {
521 spin_unlock(&transaction->t_handle_lock); 523 spin_unlock(&transaction->t_handle_lock);
524 finish_wait(&journal->j_wait_updates, &wait);
522 break; 525 break;
523 } 526 }
524 prepare_to_wait(&journal->j_wait_updates, &wait,
525 TASK_UNINTERRUPTIBLE);
526 spin_unlock(&transaction->t_handle_lock); 527 spin_unlock(&transaction->t_handle_lock);
527 write_unlock(&journal->j_state_lock); 528 write_unlock(&journal->j_state_lock);
528 schedule(); 529 schedule();