Re: [OOPS] 2.6.7-rc2: mpage_writepage
From: Russell King
Date: Tue Jun 01 2004 - 11:47:38 EST
On Tue, Jun 01, 2004 at 03:00:25PM +0100, Russell King wrote:
> I've been trying to look at a cache problem on ARM PXA, but unfortunately
> hit the following problem:
>
> Opening 'l/testfile'
> Unable to handle kernel NULL pointer dereference at virtual address 00000000
> PC is at 0x0
> LR is at mpage_writepage+0x1fc/0x5e0
Ok, I intend to work around this bug by the following:
--- orig/fs/mpage.c Thu Apr 22 15:28:27 2004
+++ linux/fs/mpage.c Tue Jun 1 17:44:11 2004
@@ -619,7 +619,7 @@
writepage = NULL;
if (get_block == NULL)
writepage = mapping->a_ops->writepage;
-
+if (!get_block && !writepage) return 0; /* save us from ramfs */
pagevec_init(&pvec, 0);
if (wbc->sync_mode == WB_SYNC_NONE) {
index = mapping->writeback_index; /* Start from prev offset */
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core
-
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/