summaryrefslogtreecommitdiffstats
path: root/fs/jbd2
diff options
context:
space:
mode:
authorAndreas Dilger <adilger@sun.com>2009-08-10 22:51:53 -0400
committerTheodore Ts'o <tytso@mit.edu>2009-08-10 22:51:53 -0400
commitb1f485f20eb9b02cc7d2009556287f3939d480cc (patch)
tree08406f7f1ea6ec37fce67e5e592c657a00084f3c /fs/jbd2
parentc333e073b7bf76dc819a6b4ce6bef88ee5fa5e50 (diff)
downloadlinux-b1f485f20eb9b02cc7d2009556287f3939d480cc.tar.bz2
jbd2: round commit timer up to avoid uncommitted transaction
fix jiffie rounding in jbd commit timer setup code. Rounding down could cause the timer to be fired before the corresponding transaction has expired. That transaction can stay not committed forever if no new transaction is created or expicit sync/umount happens. Signed-off-by: Alex Zhuravlev (Tomas) <alex.zhuravlev@sun.com> Signed-off-by: Andreas Dilger <adilger@sun.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/jbd2')
-rw-r--r--fs/jbd2/transaction.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c
index 6213ac728f30..4516a87ca55c 100644
--- a/fs/jbd2/transaction.c
+++ b/fs/jbd2/transaction.c
@@ -57,7 +57,7 @@ jbd2_get_transaction(journal_t *journal, transaction_t *transaction)
INIT_LIST_HEAD(&transaction->t_private_list);
/* Set up the commit timer for the new transaction. */
- journal->j_commit_timer.expires = round_jiffies(transaction->t_expires);
+ journal->j_commit_timer.expires = round_jiffies_up(transaction->t_expires);
add_timer(&journal->j_commit_timer);
J_ASSERT(journal->j_running_transaction == NULL);