Hello!

  Attached patch makes reiserfs BUG() when somebody tries to start a
larger transaction than it's allowed (currently the code just silently
deadlocks). I think this is a better behaviour. Can you please apply the
patch?

                                                                Honza
Make kernel BUG when someone tries to start a transaction which is too
large.

Signed-off-by: Jan Kara <[EMAIL PROTECTED]>

diff -rup linux-2.6.12-rc4/fs/reiserfs/journal.c 
linux-2.6.12-rc4-reiserassert/fs/reiserfs/journal.c
--- linux-2.6.12-rc4/fs/reiserfs/journal.c      Sat May 14 13:02:01 2005
+++ linux-2.6.12-rc4-reiserassert/fs/reiserfs/journal.c Sat May 14 13:21:43 2005
@@ -2631,6 +2631,8 @@ static int do_journal_begin_r(struct rei
   int retval;
 
   reiserfs_check_lock_depth(p_s_sb, "journal_begin") ;
+  if (nblocks > journal->j_trans_max)
+       BUG();
 
   PROC_INFO_INC( p_s_sb, journal.journal_being );
   /* set here for journal_join */

Reply via email to