]> err.no Git - linux-2.6/commitdiff
[PATCH] mm: kill kmem_cache_t usage
authorPekka Enberg <penberg@cs.helsinki.fi>
Wed, 22 Mar 2006 08:08:13 +0000 (00:08 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 22 Mar 2006 15:53:58 +0000 (07:53 -0800)
We have struct kmem_cache now so use it instead of the old typedef.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
mm/mempolicy.c
mm/mempool.c
mm/rmap.c
mm/shmem.c

index b21869a39f0b0380265fb3bd9e0ed885a29afa0d..96195dcb62e1a7edbc40afe746a8e1a4434d78f7 100644 (file)
@@ -98,8 +98,8 @@
 /* The number of pages to migrate per call to migrate_pages() */
 #define MIGRATE_CHUNK_SIZE 256
 
-static kmem_cache_t *policy_cache;
-static kmem_cache_t *sn_cache;
+static struct kmem_cache *policy_cache;
+static struct kmem_cache *sn_cache;
 
 #define PDprintk(fmt...)
 
index 1a99b80480d3da562117c14db409149abdfd7e61..f71893ed354358fcf2c6dcfc576a7a7730852cc6 100644 (file)
@@ -278,14 +278,14 @@ EXPORT_SYMBOL(mempool_free);
  */
 void *mempool_alloc_slab(gfp_t gfp_mask, void *pool_data)
 {
-       kmem_cache_t *mem = (kmem_cache_t *) pool_data;
+       struct kmem_cache *mem = pool_data;
        return kmem_cache_alloc(mem, gfp_mask);
 }
 EXPORT_SYMBOL(mempool_alloc_slab);
 
 void mempool_free_slab(void *element, void *pool_data)
 {
-       kmem_cache_t *mem = (kmem_cache_t *) pool_data;
+       struct kmem_cache *mem = pool_data;
        kmem_cache_free(mem, element);
 }
 EXPORT_SYMBOL(mempool_free_slab);
index 67f0e20b101ffbba34a8a3568374e14ab1a2bee8..134aef9d66c5e9a2958a5bc6e49670751faade49 100644 (file)
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -58,7 +58,7 @@
 
 //#define RMAP_DEBUG /* can be enabled only for debugging */
 
-kmem_cache_t *anon_vma_cachep;
+struct kmem_cache *anon_vma_cachep;
 
 static inline void validate_anon_vma(struct vm_area_struct *find_vma)
 {
@@ -166,7 +166,8 @@ void anon_vma_unlink(struct vm_area_struct *vma)
                anon_vma_free(anon_vma);
 }
 
-static void anon_vma_ctor(void *data, kmem_cache_t *cachep, unsigned long flags)
+static void anon_vma_ctor(void *data, struct kmem_cache *cachep,
+                         unsigned long flags)
 {
        if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) ==
                                                SLAB_CTOR_CONSTRUCTOR) {
index 7c455fbaff7b6a0ea9b98c66c89bbc59c8333a64..f523a1533ce1c621f9d41bdc69c8f7dba7bd0927 100644 (file)
@@ -2119,7 +2119,7 @@ failed:
        return err;
 }
 
-static kmem_cache_t *shmem_inode_cachep;
+static struct kmem_cache *shmem_inode_cachep;
 
 static struct inode *shmem_alloc_inode(struct super_block *sb)
 {
@@ -2139,7 +2139,8 @@ static void shmem_destroy_inode(struct inode *inode)
        kmem_cache_free(shmem_inode_cachep, SHMEM_I(inode));
 }
 
-static void init_once(void *foo, kmem_cache_t *cachep, unsigned long flags)
+static void init_once(void *foo, struct kmem_cache *cachep,
+                     unsigned long flags)
 {
        struct shmem_inode_info *p = (struct shmem_inode_info *) foo;