On Fri, Jan 06, 2012 at 03:17:59PM +0800, Li Zefan wrote:
> > [ 1499.946409] BUG: unable to handle kernel NULL pointer dereference at 0000000000000001
> > [ 1499.946437] IP: [<ffffffffa0456dd7>] io_ctl_drop_pages+0x37/0x70 [btrfs]
>
> 0x01 is weired, don't know how it occured. Nevertheless we need this fix:
>
> diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
> index ec23d43..81771ca 100644
> --- a/fs/btrfs/free-space-cache.c
> +++ b/fs/btrfs/free-space-cache.c
> @@ -319,9 +319,11 @@ static void io_ctl_drop_pages(struct io_ctl *io_ctl)
> io_ctl_unmap_page(io_ctl);
>
> for (i = 0; i < io_ctl->num_pages; i++) {
> - ClearPageChecked(io_ctl->pages[i]);
> - unlock_page(io_ctl->pages[i]);
> - page_cache_release(io_ctl->pages[i]);
> + if (io_ctl->pages[i]) {
> + ClearPageChecked(io_ctl->pages[i]);
> + unlock_page(io_ctl->pages[i]);
> + page_cache_release(io_ctl->pages[i]);
> + }
> }
> }
mount did not crash with this fix, though anything that touches files
causes the crash. umount is still stuck the same way as before. I'll not
touch the partitions in case you have patches to test.
david
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html