Re: isn't __brelse() wrong?

From: Ingo Molnar (mingo@chiara.csoma.elte.hu)
Date: Mon Mar 06 2000 - 06:26:06 EST


On 3 Mar 2000, Linus Torvalds wrote:

> > if (atomic_read(&buf->b_count)) {
> > atomic_dec(&buf->b_count);
> > return;
> > }

> I don't think it has caught anybody in the last few years, but it's
> certainly cheap enough, so..

i've certainly seen it during development of buffer-cache/IO related
patches. b_count usage bugs trigger this debugging message so
deterministically that i believe they get fixed prior seeing any official
kernel. I'd suggest a patch like this to make the situation clearer:

- printk("VFS: brelse: Trying to free free buffer\n");
+ BUG();

-- mingo

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



This archive was generated by hypermail 2b29 : Tue Mar 07 2000 - 21:00:19 EST