Bläddra i källkod

jbd2: Submit writes to the journal using WRITE_SYNC

Since we will be waiting the write of the commit record to the journal
to complete in journal_submit_commit_record(), submit it using
WRITE_SYNC.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o 16 år sedan
förälder
incheckning
40a1984d22
1 ändrade filer med 2 tillägg och 2 borttagningar
  1. 2 2
      fs/jbd2/commit.c

+ 2 - 2
fs/jbd2/commit.c

@@ -138,7 +138,7 @@ static int journal_submit_commit_record(journal_t *journal,
 		set_buffer_ordered(bh);
 		set_buffer_ordered(bh);
 		barrier_done = 1;
 		barrier_done = 1;
 	}
 	}
-	ret = submit_bh(WRITE, bh);
+	ret = submit_bh(WRITE_SYNC, bh);
 	if (barrier_done)
 	if (barrier_done)
 		clear_buffer_ordered(bh);
 		clear_buffer_ordered(bh);
 
 
@@ -159,7 +159,7 @@ static int journal_submit_commit_record(journal_t *journal,
 		lock_buffer(bh);
 		lock_buffer(bh);
 		set_buffer_uptodate(bh);
 		set_buffer_uptodate(bh);
 		clear_buffer_dirty(bh);
 		clear_buffer_dirty(bh);
-		ret = submit_bh(WRITE, bh);
+		ret = submit_bh(WRITE_SYNC, bh);
 	}
 	}
 	*cbh = bh;
 	*cbh = bh;
 	return ret;
 	return ret;