patch-2.4.27 linux-2.4.27/fs/jbd/transaction.c
Next file: linux-2.4.27/fs/jfs/file.c
Previous file: linux-2.4.27/fs/hpfs/super.c
Back to the patch index
Back to the overall index
- Lines: 36
- Date:
2004-08-07 16:26:05.985401468 -0700
- Orig file:
linux-2.4.26/fs/jbd/transaction.c
- Orig date:
2004-02-18 05:36:31.000000000 -0800
diff -urN linux-2.4.26/fs/jbd/transaction.c linux-2.4.27/fs/jbd/transaction.c
@@ -1694,6 +1694,23 @@
return 0;
}
+void debug_page(struct page *p)
+{
+ struct buffer_head *bh;
+
+ bh = p->buffers;
+
+ printk(KERN_ERR "%s: page index:%lu count:%d flags:%lx\n", __FUNCTION__,
+ p->index, atomic_read(&p->count), p->flags);
+
+ while (bh) {
+ printk(KERN_ERR "%s: bh b_next:%p blocknr:%lu b_list:%u state:%lx\n",
+ __FUNCTION__, bh->b_next, bh->b_blocknr, bh->b_list,
+ bh->b_state);
+ bh = bh->b_this_page;
+ }
+}
+
/**
* int journal_try_to_free_buffers() - try to free page buffers.
@@ -1752,6 +1769,11 @@
do {
struct buffer_head *p = tmp;
+ if (unlikely(!tmp)) {
+ debug_page(page);
+ BUG();
+ }
+
tmp = tmp->b_this_page;
if (buffer_jbd(p))
if (!__journal_try_to_free_buffer(p, &locked_or_dirty))
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)