Patchwork [4/4] jbd: make shure that we do not miss aborted state

login
register
mail settings
Submitter Dmitri Monakho
Date May 16, 2013, 12:28 p.m.
Message ID <1368707290-26185-4-git-send-email-dmonakhov@openvz.org>
Download mbox | patch
Permalink /patch/244301/
State Not Applicable
Headers show

Comments

Dmitri Monakho - May 16, 2013, 12:28 p.m.
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
---
 fs/jbd/journal.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

Patch

diff --git a/fs/jbd/journal.c b/fs/jbd/journal.c
index 81cc7ea..dc00240 100644
--- a/fs/jbd/journal.c
+++ b/fs/jbd/journal.c
@@ -575,12 +575,11 @@  int log_wait_commit(journal_t *journal, tid_t tid)
 				!tid_gt(tid, journal->j_commit_sequence));
 		spin_lock(&journal->j_state_lock);
 	}
-	spin_unlock(&journal->j_state_lock);
-
 	if (unlikely(is_journal_aborted(journal))) {
 		printk(KERN_EMERG "journal commit I/O error\n");
 		err = -EIO;
 	}
+	spin_unlock(&journal->j_state_lock);
 	return err;
 }