Re: More information on reiserfs bug

Chris Mason
2001-01-16T19:10:15Z

On Tuesday, January 16, 2001 07:38:58 PM +0100 Jakob Borg
<jakob@borg.pp.se> wrote:

> Hi again,
>
> It seems the problem occurs every time i start fetchmail... Attached are
> ksymoops output and .config (if i remember this time). If there is
> anything else I can do to help debug this, just tell me

Linus fixed that hunk of debugging code in his merge, and it found a bug in
the reiserfs O_SYNC support. reiserfs_commit_write needs to hold the BKL.

This should fix it:

--- linux/fs/reiserfs/inode.c.1 Tue Jan 16 13:46:35 2001
+++ linux/fs/reiserfs/inode.c Tue Jan 16 13:49:21 2001
@@ -1853,6 +1853,11 @@
struct reiserfs_transaction_handle th ;

reiserfs_wait_on_write_block(inode->i_sb) ;
+
+ /* prevent_flush_page_lock must be called before generic_commit_write,
+ ** and the BKL must be held during the call.
+ */
+ lock_kernel() ;
prevent_flush_page_lock(page, inode) ;
ret = generic_commit_write(f, page, from, to) ;
/* we test for O_SYNC here so we can commit the transaction
@@ -1866,6 +1871,8 @@
journal_end_sync(&th, inode->i_sb, 1) ;
}
allow_flush_page_lock(page, inode) ;
+ unlock_kernel() ;
+
return ret ;
}

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