Commit ef43bc4f authored by Jan Kara's avatar Jan Kara Committed by Linus Torvalds
Browse files

[PATCH] reiserfs: fix assertion failure in reiserfs+journaled quotas

Sometimes we call do_journal_end() with t_refcount == 0.  If quota is
turned on and we happen to have some inode with preallocation bad things
happen as we try to use the current handle for quota operations.  Checks
for t_refcount in journal_begin() fail and we Oops.  We raise t_refcount to
make those checks happy.  We should not cause any bad as all the needed
quota blocks should be already attached to the transaction (they were
attached to the transaction when we allocated those preallocation blocks).
Signed-off-by: default avatarJan Kara <>
Cc: Jeff Mahoney <>
Cc: Chris Mason <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 0c8365ec
......@@ -3925,10 +3925,13 @@ static int do_journal_end(struct reiserfs_transaction_handle *th,
flush = 1;
/* quota ops might need to nest, setup the journal_info pointer for them */
/* quota ops might need to nest, setup the journal_info pointer for them
* and raise the refcount so that it is > 0. */
current->journal_info = th;
reiserfs_discard_all_prealloc(th); /* it should not involve new blocks into
* the transaction */
current->journal_info = th->t_handle_save;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment