diff options
author | Pekka Enberg <penberg@cs.helsinki.fi> | 2006-03-22 03:08:13 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-22 10:53:58 -0500 |
commit | fcc234f888ba2365c44ba0507eb8a18eebf1f594 (patch) | |
tree | afc0d6f5a6191a94d8285f0b21ecec5a9b911df9 | |
parent | b5d8ca7c50826c0b456b4a646875dc573adfde2b (diff) |
[PATCH] mm: kill kmem_cache_t usage
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>
-rw-r--r-- | mm/mempolicy.c | 4 | ||||
-rw-r--r-- | mm/mempool.c | 4 | ||||
-rw-r--r-- | mm/rmap.c | 5 | ||||
-rw-r--r-- | mm/shmem.c | 5 |
4 files changed, 10 insertions, 8 deletions
diff --git a/mm/mempolicy.c b/mm/mempolicy.c index b21869a39f0b..96195dcb62e1 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c | |||
@@ -98,8 +98,8 @@ | |||
98 | /* The number of pages to migrate per call to migrate_pages() */ | 98 | /* The number of pages to migrate per call to migrate_pages() */ |
99 | #define MIGRATE_CHUNK_SIZE 256 | 99 | #define MIGRATE_CHUNK_SIZE 256 |
100 | 100 | ||
101 | static kmem_cache_t *policy_cache; | 101 | static struct kmem_cache *policy_cache; |
102 | static kmem_cache_t *sn_cache; | 102 | static struct kmem_cache *sn_cache; |
103 | 103 | ||
104 | #define PDprintk(fmt...) | 104 | #define PDprintk(fmt...) |
105 | 105 | ||
diff --git a/mm/mempool.c b/mm/mempool.c index 1a99b80480d3..f71893ed3543 100644 --- a/mm/mempool.c +++ b/mm/mempool.c | |||
@@ -278,14 +278,14 @@ EXPORT_SYMBOL(mempool_free); | |||
278 | */ | 278 | */ |
279 | void *mempool_alloc_slab(gfp_t gfp_mask, void *pool_data) | 279 | void *mempool_alloc_slab(gfp_t gfp_mask, void *pool_data) |
280 | { | 280 | { |
281 | kmem_cache_t *mem = (kmem_cache_t *) pool_data; | 281 | struct kmem_cache *mem = pool_data; |
282 | return kmem_cache_alloc(mem, gfp_mask); | 282 | return kmem_cache_alloc(mem, gfp_mask); |
283 | } | 283 | } |
284 | EXPORT_SYMBOL(mempool_alloc_slab); | 284 | EXPORT_SYMBOL(mempool_alloc_slab); |
285 | 285 | ||
286 | void mempool_free_slab(void *element, void *pool_data) | 286 | void mempool_free_slab(void *element, void *pool_data) |
287 | { | 287 | { |
288 | kmem_cache_t *mem = (kmem_cache_t *) pool_data; | 288 | struct kmem_cache *mem = pool_data; |
289 | kmem_cache_free(mem, element); | 289 | kmem_cache_free(mem, element); |
290 | } | 290 | } |
291 | EXPORT_SYMBOL(mempool_free_slab); | 291 | EXPORT_SYMBOL(mempool_free_slab); |
@@ -58,7 +58,7 @@ | |||
58 | 58 | ||
59 | //#define RMAP_DEBUG /* can be enabled only for debugging */ | 59 | //#define RMAP_DEBUG /* can be enabled only for debugging */ |
60 | 60 | ||
61 | kmem_cache_t *anon_vma_cachep; | 61 | struct kmem_cache *anon_vma_cachep; |
62 | 62 | ||
63 | static inline void validate_anon_vma(struct vm_area_struct *find_vma) | 63 | static inline void validate_anon_vma(struct vm_area_struct *find_vma) |
64 | { | 64 | { |
@@ -166,7 +166,8 @@ void anon_vma_unlink(struct vm_area_struct *vma) | |||
166 | anon_vma_free(anon_vma); | 166 | anon_vma_free(anon_vma); |
167 | } | 167 | } |
168 | 168 | ||
169 | static void anon_vma_ctor(void *data, kmem_cache_t *cachep, unsigned long flags) | 169 | static void anon_vma_ctor(void *data, struct kmem_cache *cachep, |
170 | unsigned long flags) | ||
170 | { | 171 | { |
171 | if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == | 172 | if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == |
172 | SLAB_CTOR_CONSTRUCTOR) { | 173 | SLAB_CTOR_CONSTRUCTOR) { |
diff --git a/mm/shmem.c b/mm/shmem.c index 7c455fbaff7b..f523a1533ce1 100644 --- a/mm/shmem.c +++ b/mm/shmem.c | |||
@@ -2119,7 +2119,7 @@ failed: | |||
2119 | return err; | 2119 | return err; |
2120 | } | 2120 | } |
2121 | 2121 | ||
2122 | static kmem_cache_t *shmem_inode_cachep; | 2122 | static struct kmem_cache *shmem_inode_cachep; |
2123 | 2123 | ||
2124 | static struct inode *shmem_alloc_inode(struct super_block *sb) | 2124 | static struct inode *shmem_alloc_inode(struct super_block *sb) |
2125 | { | 2125 | { |
@@ -2139,7 +2139,8 @@ static void shmem_destroy_inode(struct inode *inode) | |||
2139 | kmem_cache_free(shmem_inode_cachep, SHMEM_I(inode)); | 2139 | kmem_cache_free(shmem_inode_cachep, SHMEM_I(inode)); |
2140 | } | 2140 | } |
2141 | 2141 | ||
2142 | static void init_once(void *foo, kmem_cache_t *cachep, unsigned long flags) | 2142 | static void init_once(void *foo, struct kmem_cache *cachep, |
2143 | unsigned long flags) | ||
2143 | { | 2144 | { |
2144 | struct shmem_inode_info *p = (struct shmem_inode_info *) foo; | 2145 | struct shmem_inode_info *p = (struct shmem_inode_info *) foo; |
2145 | 2146 | ||