Date: Wed, 6 Sep 2000 08:29:49 -0700 (PDT) From: Linus Torvalds <torvalds@transmeta.com> To: Tim Waugh <tim@cyberelk.demon.co.uk> Subject: Re: Still ext2-corruption in test8-pre5 (incl. OOPS) On Wed, 6 Sep 2000, Tim Waugh wrote: > On Tue, Sep 05, 2000 at 07:14:02PM -0700, Linus Torvalds wrote: > > > How about this patch? > > Got this oops. This one I cannot explain. It's a bh that is NULL, but it's a new case completely. It looks like you have a 1kB blocksize, no? It furthermore looks like the page only had two buffers on it, and accessing the fourth one blows up (accessing the third one gets NULL, which is why it only blows up on the fourth one). But it _has_ to have four buffers on it. Two buffers just aren't enough to cover a 4kB page. Uh. DUH! I found the bug. It shouldn't be "bh->b_next". That's just the next buffer on the hash chain. It should be "bh->b_this_page". Just change block_truncate_page() to use b_this_page instead of b_next. The "good news" is that me testing this would neve rhave found it, because all my filesystems are 4kB blocks, so the "next bh" case never triggers at all. Thanks, and THIS time it really is fixed. I mean, how many times can we get it wrong? At some point, we just have to run out of really bad ideas.. Linus - 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/