Re: back-trace on mounting ide cd-rom

From: Andrew Morton (akpm@digeo.com)
Date: Wed Apr 02 2003 - 18:45:00 EST


Robert Love <rml@tech9.net> wrote:
>
> I got the following errors and back-trace upon mounting my IDE CD-ROM
> (hdc). It seems to be a normal ISO9660... its the Red Hat 9 CD.
>
> I haven't looked into it yet. Not sure why there is ext3 stuff in
> there... maybe the CD-ROM mount is unrelated? Mounting the CD
> subsequent times is OK.
>
> Kernel is 2.5.66-mm2. UP, preempt, no highmem, i686.
>
> Here we go:
>
> buffer layer error at fs/buffer.c:127

ah, my new debug code is buggy. It is legal to wait upon a zero-ref buffer
if that buffer's page is locked.

diff -puN fs/buffer.c~a fs/buffer.c
--- 25/fs/buffer.c~a Wed Apr 2 15:41:25 2003
+++ 25-akpm/fs/buffer.c Wed Apr 2 15:43:02 2003
@@ -123,7 +123,8 @@ void __wait_on_buffer(struct buffer_head
         wait_queue_head_t *wqh = bh_waitq_head(bh);
         DEFINE_WAIT(wait);
 
- if (atomic_read(&bh->b_count) == 0)
+ if (atomic_read(&bh->b_count) == 0 &&
+ (!bh->b_page || !PageLocked(bh->b_page)))
                 buffer_error();
 
         do {

_

-
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/



This archive was generated by hypermail 2b29 : Mon Apr 07 2003 - 22:00:18 EST