[Devel] [PATCH RHEL7 COMMIT] jbd2: make shure that we do not miss aborted state

Konstantin Khorenko khorenko at virtuozzo.com
Mon Jun 22 03:38:11 PDT 2015


The commit is pushed to "branch-rh7-3.10.0-123.1.2-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-123.1.2.vz7.5.15
------>
commit 69088f935eea72aa83f1a9ff668c15f4ecc6b2af
Author: Dmitry Monakhov <dmonakhov at openvz.org>
Date:   Mon Jun 22 14:38:11 2015 +0400

    jbd2: make shure that we do not miss aborted state
    
    Signed-off-by: Dmitry Monakhov <dmonakhov at openvz.org>
---
 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 66b033c..5199d1c 100644
--- a/fs/jbd2/journal.c
+++ b/fs/jbd2/journal.c
@@ -698,12 +698,11 @@ 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))) {
 		printk(KERN_EMERG "journal commit I/O error\n");
 		err = -EIO;
 	}
+	read_unlock(&journal->j_state_lock);
 	return err;
 }
 



More information about the Devel mailing list