summaryrefslogtreecommitdiffstats
path: root/fs/jbd2/transaction.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2009-03-26 04:35:46 +0100
committerTheodore Ts'o <tytso@mit.edu>2009-03-26 04:35:46 +0100
commit7058548cd50e5bda8db086bb2e5c1d82f746d047 (patch)
treeacd095e9f13fcb10deab00e5da5c22d35fda646d /fs/jbd2/transaction.c
parentext4: Add auto_da_alloc mount option (diff)
downloadlinux-7058548cd50e5bda8db086bb2e5c1d82f746d047.tar.xz
linux-7058548cd50e5bda8db086bb2e5c1d82f746d047.zip
ext4: 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>
Diffstat (limited to 'fs/jbd2/transaction.c')
-rw-r--r--fs/jbd2/transaction.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c
index 28ce21d8598e..996ffda06bf3 100644
--- a/fs/jbd2/transaction.c
+++ b/fs/jbd2/transaction.c
@@ -1315,6 +1315,8 @@ int jbd2_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);