Re: [Oops] i386 mm/slab.c (cache_flusharray)
From: Nathan Scott
Date: Fri Dec 05 2003 - 04:37:48 EST
On Fri, Dec 05, 2003 at 07:14:55AM +0000, Christoph Hellwig wrote:
> On Fri, Dec 05, 2003 at 08:21:10AM +1100, Nathan Scott wrote:
> > Yeah, thats pretty silly stuff - and should be fairly easy to
> > fix by using a pagebuf flag to differentiate the two. Will do.
> IMHO a flags is wrong here. Just maek pb_addr always a pointer and
> for the case it's the preallocated array make it point pb_page_array
> or something like that. Then check whether pb_addr is pointing to the
> preallocated array.
You might be mixing up pb_pages and pb_addr there? pb_addr is
always a pointer. We need to distinguish whether it was slab
alloc'd or whether it points into page cache pages, so we know
whether to page_cache_release the pages or kfree the pointer
when we're done with the pagebuf.
The pb_page_array works just as you describe, with a prealloc'd
array of page pointers, and pb_pages either points to the array
of to a larger kmalloc'd array as necessary.
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/