Commit 7e007355 authored by Joonsoo Kim's avatar Joonsoo Kim Committed by Pekka Enberg

slab: replace non-existing 'struct freelist *' with 'void *'

There is no 'strcut freelist', but codes use pointer to 'struct freelist'.
Although compiler doesn't complain anything about this wrong usage and
codes work fine, but fixing it is better.
Signed-off-by: default avatarJoonsoo Kim <iamjoonsoo.kim@lge.com>
Signed-off-by: default avatarPekka Enberg <penberg@iki.fi>
parent 0172f779
...@@ -1954,7 +1954,7 @@ static void slab_destroy_debugcheck(struct kmem_cache *cachep, ...@@ -1954,7 +1954,7 @@ static void slab_destroy_debugcheck(struct kmem_cache *cachep,
*/ */
static void slab_destroy(struct kmem_cache *cachep, struct page *page) static void slab_destroy(struct kmem_cache *cachep, struct page *page)
{ {
struct freelist *freelist; void *freelist;
freelist = page->freelist; freelist = page->freelist;
slab_destroy_debugcheck(cachep, page); slab_destroy_debugcheck(cachep, page);
...@@ -2520,11 +2520,11 @@ int __kmem_cache_shutdown(struct kmem_cache *cachep) ...@@ -2520,11 +2520,11 @@ int __kmem_cache_shutdown(struct kmem_cache *cachep)
* kmem_find_general_cachep till the initialization is complete. * kmem_find_general_cachep till the initialization is complete.
* Hence we cannot have freelist_cache same as the original cache. * Hence we cannot have freelist_cache same as the original cache.
*/ */
static struct freelist *alloc_slabmgmt(struct kmem_cache *cachep, static void *alloc_slabmgmt(struct kmem_cache *cachep,
struct page *page, int colour_off, struct page *page, int colour_off,
gfp_t local_flags, int nodeid) gfp_t local_flags, int nodeid)
{ {
struct freelist *freelist; void *freelist;
void *addr = page_address(page); void *addr = page_address(page);
if (OFF_SLAB(cachep)) { if (OFF_SLAB(cachep)) {
...@@ -2646,7 +2646,7 @@ static void slab_put_obj(struct kmem_cache *cachep, struct page *page, ...@@ -2646,7 +2646,7 @@ static void slab_put_obj(struct kmem_cache *cachep, struct page *page,
* virtual address for kfree, ksize, and slab debugging. * virtual address for kfree, ksize, and slab debugging.
*/ */
static void slab_map_pages(struct kmem_cache *cache, struct page *page, static void slab_map_pages(struct kmem_cache *cache, struct page *page,
struct freelist *freelist) void *freelist)
{ {
page->slab_cache = cache; page->slab_cache = cache;
page->freelist = freelist; page->freelist = freelist;
...@@ -2659,7 +2659,7 @@ static void slab_map_pages(struct kmem_cache *cache, struct page *page, ...@@ -2659,7 +2659,7 @@ static void slab_map_pages(struct kmem_cache *cache, struct page *page,
static int cache_grow(struct kmem_cache *cachep, static int cache_grow(struct kmem_cache *cachep,
gfp_t flags, int nodeid, struct page *page) gfp_t flags, int nodeid, struct page *page)
{ {
struct freelist *freelist; void *freelist;
size_t offset; size_t offset;
gfp_t local_flags; gfp_t local_flags;
struct kmem_cache_node *n; struct kmem_cache_node *n;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment