From 6ae1ea447d21c4fecf5df8d0e1022461274fb4e8 Mon Sep 17 00:00:00 2001 From: Chris Mason Date: Wed, 1 Feb 2006 03:06:50 -0800 Subject: [PATCH] [PATCH] reiserfs: reiserfs fix journal accounting in journal_transaction_should_end reiserfs: journal_transaction_should_end should increase the count of blocks allocated so the transaction subsystem can keep new writers from creating a transaction that is too large. Signed-off-by: Chris Mason Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/reiserfs/journal.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c index 47c9f432dea5..b7a179560ab4 100644 --- a/fs/reiserfs/journal.c +++ b/fs/reiserfs/journal.c @@ -2823,6 +2823,9 @@ int journal_transaction_should_end(struct reiserfs_transaction_handle *th, journal->j_cnode_free < (journal->j_trans_max * 3)) { return 1; } + /* protected by the BKL here */ + journal->j_len_alloc += new_alloc; + th->t_blocks_allocated += new_alloc ; return 0; } -- 2.30.2