Re: [2.4] page->buffers vanished in journal_try_to_free_buffers()

From: Andrew Morton
Date: Sat Jun 19 2004 - 15:08:23 EST


Marcelo Tosatti <marcelo.tosatti@xxxxxxxxxxxx> wrote:
>
> Maybe adding this (untested) to v2.4 mainline helps? Comments?

It would be helpful.

> --- transaction.c.orig 2004-06-19 15:21:32.861148560 -0300
> +++ transaction.c 2004-06-19 15:23:18.214132472 -0300
> @@ -1694,6 +1694,24 @@
> return 0;
> }
>
> +void debug_page(struct page *p)
> +{
> + struct buffer_head *bh;
> +
> + bh = p->buffers;
> +
> + printk(KERN_ERR "%s: page index:%u count:%d flags:%x\n", __FUNCTION__,
> + ,p->index , atomic_read(&p->count), p->flags);

^

> +
> + do {
> + printk(KERN_ERR "%s: bh b_next:%p blocknr:%u b_list:%u state:%x\n",
> + __FUNCTION__, bh->b_next, bh->b_blocknr, bh->b_list,
> + bh->b_state);
> + bh = bh->b_this_page;
> + } while (bh);
> +}
> +

you'll want to make this a while (!bh) {} loop, to handle the
page->buffers==NULL case.

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