[Devel] [PATCH RH9 06/12] jbd2: make shure that we do not miss aborted state

Kirill Tkhai ktkhai at virtuozzo.com
Thu Oct 7 13:20:27 MSK 2021


From: Dmitry Monakhov <dmonakhov at openvz.org>

Signed-off-by: Dmitry Monakhov <dmonakhov at openvz.org>

(cherry picked from vz7 commit 2398d7694d2afe5cf83e379ad4ea6e2ddc191675)
Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 fs/jbd2/journal.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
index 35302bc192eb..4a879e04f4b1 100644
--- a/fs/jbd2/journal.c
+++ b/fs/jbd2/journal.c
@@ -713,10 +713,9 @@ int jbd2_log_wait_commit(journal_t *journal, tid_t tid)
 				!tid_gt(tid, journal->j_commit_sequence));
 		read_lock(&journal->j_state_lock);
 	}
-	read_unlock(&journal->j_state_lock);
-
 	if (unlikely(is_journal_aborted(journal)))
 		err = -EIO;
+	read_unlock(&journal->j_state_lock);
 	return err;
 }
 




More information about the Devel mailing list