VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: Dave Kleikamp <shaggy@linux.vnet.ibm.com> 2008-02-10 01:09:32 -0500 committer: Theodore Ts'o <tytso@mit.edu> 2008-02-10 01:09:32 -0500 commit: c4e35e07af162ea4d642b1c6ffacbb63c3ed1804 parent: 7fb5409df092589b86cc9412d926879cb572b7f0
Commit Summary:
JBD2: Clear buffer_ordered flag for barried IO request on success
Diffstat:
1 file changed, 2 insertions, 1 deletion
diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c
index c35bf16f44f4..a8173081f831 100644
--- a/fs/jbd2/commit.c
+++ b/fs/jbd2/commit.c
@@ -148,6 +148,8 @@ static int journal_submit_commit_record(journal_t *journal,
 		barrier_done = 1;
 	}
 	ret = submit_bh(WRITE, bh);
+	if (barrier_done)
+		clear_buffer_ordered(bh);
 
 	/* is it possible for another commit to fail at roughly
 	 * the same time as this one?  If so, we don't want to
@@ -166,7 +168,6 @@ static int journal_submit_commit_record(journal_t *journal,
 		spin_unlock(&journal->j_state_lock);
 
 		/* And try again, without the barrier */
-		clear_buffer_ordered(bh);
 		set_buffer_uptodate(bh);
 		set_buffer_dirty(bh);
 		ret = submit_bh(WRITE, bh);