Re: BUG in reiserfs with 2.4.2-ac20 + linux-aic7xxx Rev 6.1.7

Chris Mason (mason@suse.com)
Mon, 26 Mar 2001 11:26:35 -0500


>
> Mar 25 06:56:50 gip2 kernel: journal_begin called without kernel lock held
> Mar 25 06:56:50 gip2 kernel: kernel BUG at journal.c:423!
>
Ok, this BUG is there to catch people trying to use the reiserfs journal
without the BKL held. Older ac series kernel had a bug where vmtruncate
would trigger this when called from generic_file_write (which your stack
trace shows you hit).

But, ac20 should have the fix. Looks like only the expanding truncate case
ended up under the BKL in vmtruncate. This untested diff is stolen from the
expanding truncate fix in ac25:

--- linux/mm/memory.c.1 Mon Mar 26 11:05:25 2001
+++ linux/mm/memory.c Mon Mar 26 11:06:31 2001
@@ -969,7 +969,12 @@
spin_unlock(&mapping->i_shared_lock);
truncate_inode_pages(mapping, offset);
if (inode->i_op && inode->i_op->truncate)
+ {
+ /* This doesnt scale but it is meant to be a 2.4 invariant */
+ lock_kernel();
inode->i_op->truncate(inode);
+ unlock_kernel();
+ }
return 0;

do_expand:

-chris

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/