summaryrefslogtreecommitdiffstats
path: root/fs/jbd/transaction.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2009-03-27 22:14:27 -0400
committerTheodore Ts'o <tytso@mit.edu>2009-03-27 22:14:27 -0400
commit512a004382f2c60d5c4f855476ba965adc00250c (patch)
treee0ecfce01aab892a415b95d6d4c8c5a8bd033a49 /fs/jbd/transaction.c
parenta64c8610bd3b753c6aff58f51c04cdf0ae478c18 (diff)
downloadop-kernel-dev-512a004382f2c60d5c4f855476ba965adc00250c.zip
op-kernel-dev-512a004382f2c60d5c4f855476ba965adc00250c.tar.gz
ext3: Use WRITE_SYNC for commits which are caused by fsync()
If a commit is triggered by fsync(), set a flag indicating the journal blocks associated with the transaction should be flushed out using WRITE_SYNC. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Acked-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/jbd/transaction.c')
-rw-r--r--fs/jbd/transaction.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/jbd/transaction.c b/fs/jbd/transaction.c
index e6a1174..ed886e6 100644
--- a/fs/jbd/transaction.c
+++ b/fs/jbd/transaction.c
@@ -1440,6 +1440,8 @@ int journal_stop(handle_t *handle)
}
}
+ if (handle->h_sync)
+ transaction->t_synchronous_commit = 1;
current->journal_info = NULL;
spin_lock(&journal->j_state_lock);
spin_lock(&transaction->t_handle_lock);
OpenPOWER on IntegriCloud