aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2008-07-25 22:45:34 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-26 15:00:07 -0400
commit51cc50685a4275c6a02653670af9f108a64e01cf (patch)
tree819d47bd2b0c8a9d1835d863853804b0a0242b97
parentd91958815d214ea365b98cbff6215383897edcb6 (diff)
SL*B: drop kmem cache argument from constructor
Kmem cache passed to constructor is only needed for constructors that are themselves multiplexeres. Nobody uses this "feature", nor does anybody uses passed kmem cache in non-trivial way, so pass only pointer to object. Non-trivial places are: arch/powerpc/mm/init_64.c arch/powerpc/mm/hugetlbpage.c This is flag day, yes. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Acked-by: Pekka Enberg <penberg@cs.helsinki.fi> Acked-by: Christoph Lameter <cl@linux-foundation.org> Cc: Jon Tollefson <kniht@linux.vnet.ibm.com> Cc: Nick Piggin <nickpiggin@yahoo.com.au> Cc: Matt Mackall <mpm@selenic.com> [akpm@linux-foundation.org: fix arch/powerpc/mm/hugetlbpage.c] [akpm@linux-foundation.org: fix mm/slab.c] [akpm@linux-foundation.org: fix ubifs] Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--arch/arm/plat-s3c24xx/dma.c2
-rw-r--r--arch/powerpc/kernel/rtas_flash.c2
-rw-r--r--arch/powerpc/mm/hugetlbpage.c9
-rw-r--r--arch/powerpc/mm/init_64.c24
-rw-r--r--arch/powerpc/platforms/cell/spufs/inode.c2
-rw-r--r--arch/sh/mm/pmb.c2
-rw-r--r--arch/xtensa/mm/init.c2
-rw-r--r--drivers/usb/mon/mon_text.c4
-rw-r--r--fs/adfs/super.c2
-rw-r--r--fs/affs/super.c2
-rw-r--r--fs/afs/super.c4
-rw-r--r--fs/befs/linuxvfs.c2
-rw-r--r--fs/bfs/inode.c2
-rw-r--r--fs/block_dev.c2
-rw-r--r--fs/buffer.c2
-rw-r--r--fs/cifs/cifsfs.c2
-rw-r--r--fs/coda/inode.c2
-rw-r--r--fs/ecryptfs/main.c4
-rw-r--r--fs/efs/super.c2
-rw-r--r--fs/ext2/super.c2
-rw-r--r--fs/ext3/super.c2
-rw-r--r--fs/ext4/super.c2
-rw-r--r--fs/fat/cache.c2
-rw-r--r--fs/fat/inode.c2
-rw-r--r--fs/fuse/inode.c2
-rw-r--r--fs/gfs2/main.c4
-rw-r--r--fs/hfs/super.c2
-rw-r--r--fs/hfsplus/super.c2
-rw-r--r--fs/hpfs/super.c2
-rw-r--r--fs/hugetlbfs/inode.c2
-rw-r--r--fs/inode.c2
-rw-r--r--fs/isofs/inode.c2
-rw-r--r--fs/jffs2/super.c2
-rw-r--r--fs/jfs/jfs_metapage.c2
-rw-r--r--fs/jfs/super.c2
-rw-r--r--fs/locks.c2
-rw-r--r--fs/minix/inode.c2
-rw-r--r--fs/ncpfs/inode.c2
-rw-r--r--fs/nfs/inode.c2
-rw-r--r--fs/ntfs/super.c2
-rw-r--r--fs/ocfs2/dlm/dlmfs.c3
-rw-r--r--fs/ocfs2/super.c2
-rw-r--r--fs/openpromfs/inode.c2
-rw-r--r--fs/proc/inode.c2
-rw-r--r--fs/qnx4/inode.c2
-rw-r--r--fs/reiserfs/super.c2
-rw-r--r--fs/romfs/inode.c2
-rw-r--r--fs/smbfs/inode.c2
-rw-r--r--fs/sysv/inode.c2
-rw-r--r--fs/ubifs/super.c2
-rw-r--r--fs/udf/super.c2
-rw-r--r--fs/ufs/super.c2
-rw-r--r--fs/xfs/linux-2.6/kmem.h2
-rw-r--r--fs/xfs/linux-2.6/xfs_super.c1
-rw-r--r--include/linux/slab.h2
-rw-r--r--include/linux/slub_def.h2
-rw-r--r--ipc/mqueue.c2
-rw-r--r--kernel/fork.c2
-rw-r--r--lib/idr.c2
-rw-r--r--lib/radix-tree.c2
-rw-r--r--mm/rmap.c2
-rw-r--r--mm/shmem.c2
-rw-r--r--mm/slab.c11
-rw-r--r--mm/slob.c7
-rw-r--r--mm/slub.c13
-rw-r--r--net/socket.c2
-rw-r--r--net/sunrpc/rpc_pipe.c2
67 files changed, 90 insertions, 106 deletions
diff --git a/arch/arm/plat-s3c24xx/dma.c b/arch/arm/plat-s3c24xx/dma.c
index 60f162dc4fad..8c5e656d5d8c 100644
--- a/arch/arm/plat-s3c24xx/dma.c
+++ b/arch/arm/plat-s3c24xx/dma.c
@@ -1304,7 +1304,7 @@ struct sysdev_class dma_sysclass = {
1304 1304
1305/* kmem cache implementation */ 1305/* kmem cache implementation */
1306 1306
1307static void s3c2410_dma_cache_ctor(struct kmem_cache *c, void *p) 1307static void s3c2410_dma_cache_ctor(void *p)
1308{ 1308{
1309 memset(p, 0, sizeof(struct s3c2410_dma_buf)); 1309 memset(p, 0, sizeof(struct s3c2410_dma_buf));
1310} 1310}
diff --git a/arch/powerpc/kernel/rtas_flash.c b/arch/powerpc/kernel/rtas_flash.c
index 09ded5c424a9..149cb112cd1a 100644
--- a/arch/powerpc/kernel/rtas_flash.c
+++ b/arch/powerpc/kernel/rtas_flash.c
@@ -286,7 +286,7 @@ static ssize_t rtas_flash_read(struct file *file, char __user *buf,
286} 286}
287 287
288/* constructor for flash_block_cache */ 288/* constructor for flash_block_cache */
289void rtas_block_ctor(struct kmem_cache *cache, void *ptr) 289void rtas_block_ctor(void *ptr)
290{ 290{
291 memset(ptr, 0, RTAS_BLK_SIZE); 291 memset(ptr, 0, RTAS_BLK_SIZE);
292} 292}
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c
index fb42c4dd3217..ed0aab0208a6 100644
--- a/arch/powerpc/mm/hugetlbpage.c
+++ b/arch/powerpc/mm/hugetlbpage.c
@@ -113,7 +113,7 @@ static inline pte_t *hugepte_offset(hugepd_t *hpdp, unsigned long addr,
113static int __hugepte_alloc(struct mm_struct *mm, hugepd_t *hpdp, 113static int __hugepte_alloc(struct mm_struct *mm, hugepd_t *hpdp,
114 unsigned long address, unsigned int psize) 114 unsigned long address, unsigned int psize)
115{ 115{
116 pte_t *new = kmem_cache_alloc(huge_pgtable_cache(psize), 116 pte_t *new = kmem_cache_zalloc(huge_pgtable_cache(psize),
117 GFP_KERNEL|__GFP_REPEAT); 117 GFP_KERNEL|__GFP_REPEAT);
118 118
119 if (! new) 119 if (! new)
@@ -730,11 +730,6 @@ static int __init hugepage_setup_sz(char *str)
730} 730}
731__setup("hugepagesz=", hugepage_setup_sz); 731__setup("hugepagesz=", hugepage_setup_sz);
732 732
733static void zero_ctor(struct kmem_cache *cache, void *addr)
734{
735 memset(addr, 0, kmem_cache_size(cache));
736}
737
738static int __init hugetlbpage_init(void) 733static int __init hugetlbpage_init(void)
739{ 734{
740 unsigned int psize; 735 unsigned int psize;
@@ -756,7 +751,7 @@ static int __init hugetlbpage_init(void)
756 HUGEPTE_TABLE_SIZE(psize), 751 HUGEPTE_TABLE_SIZE(psize),
757 HUGEPTE_TABLE_SIZE(psize), 752 HUGEPTE_TABLE_SIZE(psize),
758 0, 753 0,
759 zero_ctor); 754 NULL);
760 if (!huge_pgtable_cache(psize)) 755 if (!huge_pgtable_cache(psize))
761 panic("hugetlbpage_init(): could not create %s"\ 756 panic("hugetlbpage_init(): could not create %s"\
762 "\n", HUGEPTE_CACHE_NAME(psize)); 757 "\n", HUGEPTE_CACHE_NAME(psize));
diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c
index a41bc5aa2043..4f7df85129d8 100644
--- a/arch/powerpc/mm/init_64.c
+++ b/arch/powerpc/mm/init_64.c
@@ -136,9 +136,14 @@ static int __init setup_kcore(void)
136module_init(setup_kcore); 136module_init(setup_kcore);
137#endif 137#endif
138 138
139static void zero_ctor(struct kmem_cache *cache, void *addr) 139static void pgd_ctor(void *addr)
140{ 140{
141 memset(addr, 0, kmem_cache_size(cache)); 141 memset(addr, 0, PGD_TABLE_SIZE);
142}
143
144static void pmd_ctor(void *addr)
145{
146 memset(addr, 0, PMD_TABLE_SIZE);
142} 147}
143 148
144static const unsigned int pgtable_cache_size[2] = { 149static const unsigned int pgtable_cache_size[2] = {
@@ -163,19 +168,8 @@ struct kmem_cache *pgtable_cache[ARRAY_SIZE(pgtable_cache_size)];
163 168
164void pgtable_cache_init(void) 169void pgtable_cache_init(void)
165{ 170{
166 int i; 171 pgtable_cache[0] = kmem_cache_create(pgtable_cache_name[0], PGD_TABLE_SIZE, PGD_TABLE_SIZE, SLAB_PANIC, pgd_ctor);
167 172 pgtable_cache[1] = kmem_cache_create(pgtable_cache_name[1], PMD_TABLE_SIZE, PMD_TABLE_SIZE, SLAB_PANIC, pmd_ctor);
168 for (i = 0; i < ARRAY_SIZE(pgtable_cache_size); i++) {
169 int size = pgtable_cache_size[i];
170 const char *name = pgtable_cache_name[i];
171
172 pr_debug("Allocating page table cache %s (#%d) "
173 "for size: %08x...\n", name, i, size);
174 pgtable_cache[i] = kmem_cache_create(name,
175 size, size,
176 SLAB_PANIC,
177 zero_ctor);
178 }
179} 173}
180 174
181#ifdef CONFIG_SPARSEMEM_VMEMMAP 175#ifdef CONFIG_SPARSEMEM_VMEMMAP
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c
index 7123472801d9..690ca7b0dcf6 100644
--- a/arch/powerpc/platforms/cell/spufs/inode.c
+++ b/arch/powerpc/platforms/cell/spufs/inode.c
@@ -78,7 +78,7 @@ spufs_destroy_inode(struct inode *inode)
78} 78}
79 79
80static void 80static void
81spufs_init_once(struct kmem_cache *cachep, void *p) 81spufs_init_once(void *p)
82{ 82{
83 struct spufs_inode_info *ei = p; 83 struct spufs_inode_info *ei = p;
84 84
diff --git a/arch/sh/mm/pmb.c b/arch/sh/mm/pmb.c
index 0b0ec6e04753..46911bcbf17b 100644
--- a/arch/sh/mm/pmb.c
+++ b/arch/sh/mm/pmb.c
@@ -293,7 +293,7 @@ void pmb_unmap(unsigned long addr)
293 } while (pmbe); 293 } while (pmbe);
294} 294}
295 295
296static void pmb_cache_ctor(struct kmem_cache *cachep, void *pmb) 296static void pmb_cache_ctor(void *pmb)
297{ 297{
298 struct pmb_entry *pmbe = pmb; 298 struct pmb_entry *pmbe = pmb;
299 299
diff --git a/arch/xtensa/mm/init.c b/arch/xtensa/mm/init.c
index 81d0560eaea2..ee261005b363 100644
--- a/arch/xtensa/mm/init.c
+++ b/arch/xtensa/mm/init.c
@@ -309,7 +309,7 @@ void show_mem(void)
309 309
310struct kmem_cache *pgtable_cache __read_mostly; 310struct kmem_cache *pgtable_cache __read_mostly;
311 311
312static void pgd_ctor(struct kmem_cache *cache, void* addr) 312static void pgd_ctor(void* addr)
313{ 313{
314 pte_t* ptep = (pte_t*)addr; 314 pte_t* ptep = (pte_t*)addr;
315 int i; 315 int i;
diff --git a/drivers/usb/mon/mon_text.c b/drivers/usb/mon/mon_text.c
index 5e3e4e9b6c77..1f715436d6d3 100644
--- a/drivers/usb/mon/mon_text.c
+++ b/drivers/usb/mon/mon_text.c
@@ -87,7 +87,7 @@ struct mon_reader_text {
87 87
88static struct dentry *mon_dir; /* Usually /sys/kernel/debug/usbmon */ 88static struct dentry *mon_dir; /* Usually /sys/kernel/debug/usbmon */
89 89
90static void mon_text_ctor(struct kmem_cache *, void *); 90static void mon_text_ctor(void *);
91 91
92struct mon_text_ptr { 92struct mon_text_ptr {
93 int cnt, limit; 93 int cnt, limit;
@@ -720,7 +720,7 @@ void mon_text_del(struct mon_bus *mbus)
720/* 720/*
721 * Slab interface: constructor. 721 * Slab interface: constructor.
722 */ 722 */
723static void mon_text_ctor(struct kmem_cache *slab, void *mem) 723static void mon_text_ctor(void *mem)
724{ 724{
725 /* 725 /*
726 * Nothing to initialize. No, really! 726 * Nothing to initialize. No, really!
diff --git a/fs/adfs/super.c b/fs/adfs/super.c
index 9e421eeb672b..26f3b43726bb 100644
--- a/fs/adfs/super.c
+++ b/fs/adfs/super.c
@@ -249,7 +249,7 @@ static void adfs_destroy_inode(struct inode *inode)
249 kmem_cache_free(adfs_inode_cachep, ADFS_I(inode)); 249 kmem_cache_free(adfs_inode_cachep, ADFS_I(inode));
250} 250}
251 251
252static void init_once(struct kmem_cache *cachep, void *foo) 252static void init_once(void *foo)
253{ 253{
254 struct adfs_inode_info *ei = (struct adfs_inode_info *) foo; 254 struct adfs_inode_info *ei = (struct adfs_inode_info *) foo;
255 255
diff --git a/fs/affs/super.c b/fs/affs/super.c
index 4e0309566406..3a89094f93d0 100644
--- a/fs/affs/super.c
+++ b/fs/affs/super.c
@@ -90,7 +90,7 @@ static void affs_destroy_inode(struct inode *inode)
90 kmem_cache_free(affs_inode_cachep, AFFS_I(inode)); 90 kmem_cache_free(affs_inode_cachep, AFFS_I(inode));
91} 91}
92 92
93static void init_once(struct kmem_cache *cachep, void *foo) 93static void init_once(void *foo)
94{ 94{
95 struct affs_inode_info *ei = (struct affs_inode_info *) foo; 95 struct affs_inode_info *ei = (struct affs_inode_info *) foo;
96 96
diff --git a/fs/afs/super.c b/fs/afs/super.c
index 7e3faeef6818..250d8c4d66e4 100644
--- a/fs/afs/super.c
+++ b/fs/afs/super.c
@@ -27,7 +27,7 @@
27 27
28#define AFS_FS_MAGIC 0x6B414653 /* 'kAFS' */ 28#define AFS_FS_MAGIC 0x6B414653 /* 'kAFS' */
29 29
30static void afs_i_init_once(struct kmem_cache *cachep, void *foo); 30static void afs_i_init_once(void *foo);
31static int afs_get_sb(struct file_system_type *fs_type, 31static int afs_get_sb(struct file_system_type *fs_type,
32 int flags, const char *dev_name, 32 int flags, const char *dev_name,
33 void *data, struct vfsmount *mnt); 33 void *data, struct vfsmount *mnt);
@@ -449,7 +449,7 @@ static void afs_put_super(struct super_block *sb)
449/* 449/*
450 * initialise an inode cache slab element prior to any use 450 * initialise an inode cache slab element prior to any use
451 */ 451 */
452static void afs_i_init_once(struct kmem_cache *cachep, void *_vnode) 452static void afs_i_init_once(void *_vnode)
453{ 453{
454 struct afs_vnode *vnode = _vnode; 454 struct afs_vnode *vnode = _vnode;
455 455
diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
index e8717de3bab3..02c6e62b72f8 100644
--- a/fs/befs/linuxvfs.c
+++ b/fs/befs/linuxvfs.c
@@ -289,7 +289,7 @@ befs_destroy_inode(struct inode *inode)
289 kmem_cache_free(befs_inode_cachep, BEFS_I(inode)); 289 kmem_cache_free(befs_inode_cachep, BEFS_I(inode));
290} 290}
291 291
292static void init_once(struct kmem_cache *cachep, void *foo) 292static void init_once(void *foo)
293{ 293{
294 struct befs_inode_info *bi = (struct befs_inode_info *) foo; 294 struct befs_inode_info *bi = (struct befs_inode_info *) foo;
295 295
diff --git a/fs/bfs/inode.c b/fs/bfs/inode.c
index 053e690ec9ed..0ed57b5ee012 100644
--- a/fs/bfs/inode.c
+++ b/fs/bfs/inode.c
@@ -264,7 +264,7 @@ static void bfs_destroy_inode(struct inode *inode)
264 kmem_cache_free(bfs_inode_cachep, BFS_I(inode)); 264 kmem_cache_free(bfs_inode_cachep, BFS_I(inode));
265} 265}
266 266
267static void init_once(struct kmem_cache *cachep, void *foo) 267static void init_once(void *foo)
268{ 268{
269 struct bfs_inode_info *bi = foo; 269 struct bfs_inode_info *bi = foo;
270 270
diff --git a/fs/block_dev.c b/fs/block_dev.c
index 10d8a0aa871a..dcf37cada369 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -271,7 +271,7 @@ static void bdev_destroy_inode(struct inode *inode)
271 kmem_cache_free(bdev_cachep, bdi); 271 kmem_cache_free(bdev_cachep, bdi);
272} 272}
273 273
274static void init_once(struct kmem_cache * cachep, void *foo) 274static void init_once(void *foo)
275{ 275{
276 struct bdev_inode *ei = (struct bdev_inode *) foo; 276 struct bdev_inode *ei = (struct bdev_inode *) foo;
277 struct block_device *bdev = &ei->bdev; 277 struct block_device *bdev = &ei->bdev;
diff --git a/fs/buffer.c b/fs/buffer.c
index 109b261192d9..5fd497cdd6f3 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -3272,7 +3272,7 @@ int bh_submit_read(struct buffer_head *bh)
3272EXPORT_SYMBOL(bh_submit_read); 3272EXPORT_SYMBOL(bh_submit_read);
3273 3273
3274static void 3274static void
3275init_buffer_head(struct kmem_cache *cachep, void *data) 3275init_buffer_head(void *data)
3276{ 3276{
3277 struct buffer_head *bh = data; 3277 struct buffer_head *bh = data;
3278 3278
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index 22857c639df5..fe5f6809cba6 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -766,7 +766,7 @@ const struct file_operations cifs_dir_ops = {
766}; 766};
767 767
768static void 768static void
769cifs_init_once(struct kmem_cache *cachep, void *inode) 769cifs_init_once(void *inode)
770{ 770{
771 struct cifsInodeInfo *cifsi = inode; 771 struct cifsInodeInfo *cifsi = inode;
772 772
diff --git a/fs/coda/inode.c b/fs/coda/inode.c
index 2f58dfc70083..830f51abb971 100644
--- a/fs/coda/inode.c
+++ b/fs/coda/inode.c
@@ -58,7 +58,7 @@ static void coda_destroy_inode(struct inode *inode)
58 kmem_cache_free(coda_inode_cachep, ITOC(inode)); 58 kmem_cache_free(coda_inode_cachep, ITOC(inode));
59} 59}
60 60
61static void init_once(struct kmem_cache * cachep, void *foo) 61static void init_once(void *foo)
62{ 62{
63 struct coda_inode_info *ei = (struct coda_inode_info *) foo; 63 struct coda_inode_info *ei = (struct coda_inode_info *) foo;
64 64
diff --git a/fs/ecryptfs/main.c b/fs/ecryptfs/main.c
index 6f403cfba14f..448dfd597b5f 100644
--- a/fs/ecryptfs/main.c
+++ b/fs/ecryptfs/main.c
@@ -578,7 +578,7 @@ static struct file_system_type ecryptfs_fs_type = {
578 * Initializes the ecryptfs_inode_info_cache when it is created 578 * Initializes the ecryptfs_inode_info_cache when it is created
579 */ 579 */
580static void 580static void
581inode_info_init_once(struct kmem_cache *cachep, void *vptr) 581inode_info_init_once(void *vptr)
582{ 582{
583 struct ecryptfs_inode_info *ei = (struct ecryptfs_inode_info *)vptr; 583 struct ecryptfs_inode_info *ei = (struct ecryptfs_inode_info *)vptr;
584 584
@@ -589,7 +589,7 @@ static struct ecryptfs_cache_info {
589 struct kmem_cache **cache; 589 struct kmem_cache **cache;
590 const char *name; 590 const char *name;
591 size_t size; 591 size_t size;
592 void (*ctor)(struct kmem_cache *cache, void *obj); 592 void (*ctor)(void *obj);
593} ecryptfs_cache_infos[] = { 593} ecryptfs_cache_infos[] = {
594 { 594 {
595 .cache = &ecryptfs_auth_tok_list_item_cache, 595 .cache = &ecryptfs_auth_tok_list_item_cache,
diff --git a/fs/efs/super.c b/fs/efs/super.c
index d733531b55e2..567b134fa1f1 100644
--- a/fs/efs/super.c
+++ b/fs/efs/super.c
@@ -70,7 +70,7 @@ static void efs_destroy_inode(struct inode *inode)
70 kmem_cache_free(efs_inode_cachep, INODE_INFO(inode)); 70 kmem_cache_free(efs_inode_cachep, INODE_INFO(inode));
71} 71}
72 72
73static void init_once(struct kmem_cache *cachep, void *foo) 73static void init_once(void *foo)
74{ 74{
75 struct efs_inode_info *ei = (struct efs_inode_info *) foo; 75 struct efs_inode_info *ei = (struct efs_inode_info *) foo;
76 76
diff --git a/fs/ext2/super.c b/fs/ext2/super.c
index 31308a3b0b8b..fd88c7b43e66 100644
--- a/fs/ext2/super.c
+++ b/fs/ext2/super.c
@@ -159,7 +159,7 @@ static void ext2_destroy_inode(struct inode *inode)
159 kmem_cache_free(ext2_inode_cachep, EXT2_I(inode)); 159 kmem_cache_free(ext2_inode_cachep, EXT2_I(inode));
160} 160}
161 161
162static void init_once(struct kmem_cache * cachep, void *foo) 162static void init_once(void *foo)
163{ 163{
164 struct ext2_inode_info *ei = (struct ext2_inode_info *) foo; 164 struct ext2_inode_info *ei = (struct ext2_inode_info *) foo;
165 165
diff --git a/fs/ext3/super.c b/fs/ext3/super.c
index 615788c6843a..8ddced384674 100644
--- a/fs/ext3/super.c
+++ b/fs/ext3/super.c
@@ -472,7 +472,7 @@ static void ext3_destroy_inode(struct inode *inode)
472 kmem_cache_free(ext3_inode_cachep, EXT3_I(inode)); 472 kmem_cache_free(ext3_inode_cachep, EXT3_I(inode));
473} 473}
474 474
475static void init_once(struct kmem_cache * cachep, void *foo) 475static void init_once(void *foo)
476{ 476{
477 struct ext3_inode_info *ei = (struct ext3_inode_info *) foo; 477 struct ext3_inode_info *ei = (struct ext3_inode_info *) foo;
478 478
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 1cb371dcd609..b5479b1dff14 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -595,7 +595,7 @@ static void ext4_destroy_inode(struct inode *inode)
595 kmem_cache_free(ext4_inode_cachep, EXT4_I(inode)); 595 kmem_cache_free(ext4_inode_cachep, EXT4_I(inode));
596} 596}
597 597
598static void init_once(struct kmem_cache *cachep, void *foo) 598static void init_once(void *foo)
599{ 599{
600 struct ext4_inode_info *ei = (struct ext4_inode_info *) foo; 600 struct ext4_inode_info *ei = (struct ext4_inode_info *) foo;
601 601
diff --git a/fs/fat/cache.c b/fs/fat/cache.c
index 3a9ecac8d61f..3222f51c41cf 100644
--- a/fs/fat/cache.c
+++ b/fs/fat/cache.c
@@ -36,7 +36,7 @@ static inline int fat_max_cache(struct inode *inode)
36 36
37static struct kmem_cache *fat_cache_cachep; 37static struct kmem_cache *fat_cache_cachep;
38 38
39static void init_once(struct kmem_cache *cachep, void *foo) 39static void init_once(void *foo)
40{ 40{
41 struct fat_cache *cache = (struct fat_cache *)foo; 41 struct fat_cache *cache = (struct fat_cache *)foo;
42 42
diff --git a/fs/fat/inode.c b/fs/fat/inode.c
index 23676f9d79ce..6d266d793e2c 100644
--- a/fs/fat/inode.c
+++ b/fs/fat/inode.c
@@ -498,7 +498,7 @@ static void fat_destroy_inode(struct inode *inode)
498 kmem_cache_free(fat_inode_cachep, MSDOS_I(inode)); 498 kmem_cache_free(fat_inode_cachep, MSDOS_I(inode));
499} 499}
500 500
501static void init_once(struct kmem_cache *cachep, void *foo) 501static void init_once(void *foo)
502{ 502{
503 struct msdos_inode_info *ei = (struct msdos_inode_info *)foo; 503 struct msdos_inode_info *ei = (struct msdos_inode_info *)foo;
504 504
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
index 7d2f7d6e22e2..d2249f174e20 100644
--- a/fs/fuse/inode.c
+++ b/fs/fuse/inode.c
@@ -956,7 +956,7 @@ static inline void unregister_fuseblk(void)
956} 956}
957#endif 957#endif
958 958
959static void fuse_inode_init_once(struct kmem_cache *cachep, void *foo) 959static void fuse_inode_init_once(void *foo)
960{ 960{
961 struct inode * inode = foo; 961 struct inode * inode = foo;
962 962
diff --git a/fs/gfs2/main.c b/fs/gfs2/main.c
index bcc668d0fadd..bb2cc303ac29 100644
--- a/fs/gfs2/main.c
+++ b/fs/gfs2/main.c
@@ -24,7 +24,7 @@
24#include "util.h" 24#include "util.h"
25#include "glock.h" 25#include "glock.h"
26 26
27static void gfs2_init_inode_once(struct kmem_cache *cachep, void *foo) 27static void gfs2_init_inode_once(void *foo)
28{ 28{
29 struct gfs2_inode *ip = foo; 29 struct gfs2_inode *ip = foo;
30 30
@@ -33,7 +33,7 @@ static void gfs2_init_inode_once(struct kmem_cache *cachep, void *foo)
33 ip->i_alloc = NULL; 33 ip->i_alloc = NULL;
34} 34}
35 35
36static void gfs2_init_glock_once(struct kmem_cache *cachep, void *foo) 36static void gfs2_init_glock_once(void *foo)
37{ 37{
38 struct gfs2_glock *gl = foo; 38 struct gfs2_glock *gl = foo;
39 39
diff --git a/fs/hfs/super.c b/fs/hfs/super.c
index ac2ec5ef66e4..4abb1047c689 100644
--- a/fs/hfs/super.c
+++ b/fs/hfs/super.c
@@ -432,7 +432,7 @@ static struct file_system_type hfs_fs_type = {
432 .fs_flags = FS_REQUIRES_DEV, 432 .fs_flags = FS_REQUIRES_DEV,
433}; 433};
434 434
435static void hfs_init_once(struct kmem_cache *cachep, void *p) 435static void hfs_init_once(void *p)
436{ 436{
437 struct hfs_inode_info *i = p; 437 struct hfs_inode_info *i = p;
438 438
diff --git a/fs/hfsplus/super.c b/fs/hfsplus/super.c
index 3859118531c7..e834e578c93f 100644
--- a/fs/hfsplus/super.c
+++ b/fs/hfsplus/super.c
@@ -485,7 +485,7 @@ static struct file_system_type hfsplus_fs_type = {
485 .fs_flags = FS_REQUIRES_DEV, 485 .fs_flags = FS_REQUIRES_DEV,
486}; 486};
487 487
488static void hfsplus_init_once(struct kmem_cache *cachep, void *p) 488static void hfsplus_init_once(void *p)
489{ 489{
490 struct hfsplus_inode_info *i = p; 490 struct hfsplus_inode_info *i = p;
491 491
diff --git a/fs/hpfs/super.c b/fs/hpfs/super.c
index f63a699ec659..b8ae9c90ada0 100644
--- a/fs/hpfs/super.c
+++ b/fs/hpfs/super.c
@@ -173,7 +173,7 @@ static void hpfs_destroy_inode(struct inode *inode)
173 kmem_cache_free(hpfs_inode_cachep, hpfs_i(inode)); 173 kmem_cache_free(hpfs_inode_cachep, hpfs_i(inode));
174} 174}
175 175
176static void init_once(struct kmem_cache *cachep, void *foo) 176static void init_once(void *foo)
177{ 177{
178 struct hpfs_inode_info *ei = (struct hpfs_inode_info *) foo; 178 struct hpfs_inode_info *ei = (struct hpfs_inode_info *) foo;
179 179
diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
index dbd01d262ca4..3f58923fb39b 100644
--- a/fs/hugetlbfs/inode.c
+++ b/fs/hugetlbfs/inode.c
@@ -705,7 +705,7 @@ static const struct address_space_operations hugetlbfs_aops = {
705}; 705};
706 706
707 707
708static void init_once(struct kmem_cache *cachep, void *foo) 708static void init_once(void *foo)
709{ 709{
710 struct hugetlbfs_inode_info *ei = (struct hugetlbfs_inode_info *)foo; 710 struct hugetlbfs_inode_info *ei = (struct hugetlbfs_inode_info *)foo;
711 711
diff --git a/fs/inode.c b/fs/inode.c
index 35b6414522ea..b6726f644530 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -224,7 +224,7 @@ void inode_init_once(struct inode *inode)
224 224
225EXPORT_SYMBOL(inode_init_once); 225EXPORT_SYMBOL(inode_init_once);
226 226
227static void init_once(struct kmem_cache * cachep, void *foo) 227static void init_once(void *foo)
228{ 228{
229 struct inode * inode = (struct inode *) foo; 229 struct inode * inode = (struct inode *) foo;
230 230
diff --git a/fs/isofs/inode.c b/fs/isofs/inode.c
index 044a254d526b..26948a6033b6 100644
--- a/fs/isofs/inode.c
+++ b/fs/isofs/inode.c
@@ -73,7 +73,7 @@ static void isofs_destroy_inode(struct inode *inode)
73 kmem_cache_free(isofs_inode_cachep, ISOFS_I(inode)); 73 kmem_cache_free(isofs_inode_cachep, ISOFS_I(inode));
74} 74}
75 75
76static void init_once(struct kmem_cache *cachep, void *foo) 76static void init_once(void *foo)
77{ 77{
78 struct iso_inode_info *ei = foo; 78 struct iso_inode_info *ei = foo;
79 79
diff --git a/fs/jffs2/super.c b/fs/jffs2/super.c
index 7da69eae49e4..efd401257ed9 100644
--- a/fs/jffs2/super.c
+++ b/fs/jffs2/super.c
@@ -44,7 +44,7 @@ static void jffs2_destroy_inode(struct inode *inode)
44 kmem_cache_free(jffs2_inode_cachep, JFFS2_INODE_INFO(inode)); 44 kmem_cache_free(jffs2_inode_cachep, JFFS2_INODE_INFO(inode));
45} 45}
46 46
47static void jffs2_i_init_once(struct kmem_cache *cachep, void *foo) 47static void jffs2_i_init_once(void *foo)
48{ 48{
49 struct jffs2_inode_info *f = foo; 49 struct jffs2_inode_info *f = foo;
50 50
diff --git a/fs/jfs/jfs_metapage.c b/fs/jfs/jfs_metapage.c
index 854ff0ec574f..c350057087dd 100644
--- a/fs/jfs/jfs_metapage.c
+++ b/fs/jfs/jfs_metapage.c
@@ -182,7 +182,7 @@ static inline void remove_metapage(struct page *page, struct metapage *mp)
182 182
183#endif 183#endif
184 184
185static void init_once(struct kmem_cache *cachep, void *foo) 185static void init_once(void *foo)
186{ 186{
187 struct metapage *mp = (struct metapage *)foo; 187 struct metapage *mp = (struct metapage *)foo;
188 188
diff --git a/fs/jfs/super.c b/fs/jfs/super.c
index 359c091d8965..3630718be395 100644
--- a/fs/jfs/super.c
+++ b/fs/jfs/super.c
@@ -760,7 +760,7 @@ static struct file_system_type jfs_fs_type = {
760 .fs_flags = FS_REQUIRES_DEV, 760 .fs_flags = FS_REQUIRES_DEV,
761}; 761};
762 762
763static void init_once(struct kmem_cache *cachep, void *foo) 763static void init_once(void *foo)
764{ 764{
765 struct jfs_inode_info *jfs_ip = (struct jfs_inode_info *) foo; 765 struct jfs_inode_info *jfs_ip = (struct jfs_inode_info *) foo;
766 766
diff --git a/fs/locks.c b/fs/locks.c
index 01490300f7cb..5eb259e3cd38 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -201,7 +201,7 @@ EXPORT_SYMBOL(locks_init_lock);
201 * Initialises the fields of the file lock which are invariant for 201 * Initialises the fields of the file lock which are invariant for
202 * free file_locks. 202 * free file_locks.
203 */ 203 */
204static void init_once(struct kmem_cache *cache, void *foo) 204static void init_once(void *foo)
205{ 205{
206 struct file_lock *lock = (struct file_lock *) foo; 206 struct file_lock *lock = (struct file_lock *) foo;
207 207
diff --git a/fs/minix/inode.c b/fs/minix/inode.c
index 523d73713418..d1d1eb84679d 100644
--- a/fs/minix/inode.c
+++ b/fs/minix/inode.c
@@ -68,7 +68,7 @@ static void minix_destroy_inode(struct inode *inode)
68 kmem_cache_free(minix_inode_cachep, minix_i(inode)); 68 kmem_cache_free(minix_inode_cachep, minix_i(inode));
69} 69}
70 70
71static void init_once(struct kmem_cache * cachep, void *foo) 71static void init_once(void *foo)
72{ 72{
73 struct minix_inode_info *ei = (struct minix_inode_info *) foo; 73 struct minix_inode_info *ei = (struct minix_inode_info *) foo;
74 74
diff --git a/fs/ncpfs/inode.c b/fs/ncpfs/inode.c
index 2e5ab1204dec..d642f0e5b365 100644
--- a/fs/ncpfs/inode.c
+++ b/fs/ncpfs/inode.c
@@ -64,7 +64,7 @@ static void ncp_destroy_inode(struct inode *inode)
64 kmem_cache_free(ncp_inode_cachep, NCP_FINFO(inode)); 64 kmem_cache_free(ncp_inode_cachep, NCP_FINFO(inode));
65} 65}
66 66
67static void init_once(struct kmem_cache *cachep, void *foo) 67static void init_once(void *foo)
68{ 68{
69 struct ncp_inode_info *ei = (struct ncp_inode_info *) foo; 69 struct ncp_inode_info *ei = (struct ncp_inode_info *) foo;
70 70
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index df23f987da6b..52daefa2f521 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -1242,7 +1242,7 @@ static inline void nfs4_init_once(struct nfs_inode *nfsi)
1242#endif 1242#endif
1243} 1243}
1244 1244
1245static void init_once(struct kmem_cache * cachep, void *foo) 1245static void init_once(void *foo)
1246{ 1246{
1247 struct nfs_inode *nfsi = (struct nfs_inode *) foo; 1247 struct nfs_inode *nfsi = (struct nfs_inode *) foo;
1248 1248
diff --git a/fs/ntfs/super.c b/fs/ntfs/super.c
index 3e76f3b216bc..4a46743b5077 100644
--- a/fs/ntfs/super.c
+++ b/fs/ntfs/super.c
@@ -3080,7 +3080,7 @@ struct kmem_cache *ntfs_inode_cache;
3080struct kmem_cache *ntfs_big_inode_cache; 3080struct kmem_cache *ntfs_big_inode_cache;
3081 3081
3082/* Init once constructor for the inode slab cache. */ 3082/* Init once constructor for the inode slab cache. */
3083static void ntfs_big_inode_init_once(struct kmem_cache *cachep, void *foo) 3083static void ntfs_big_inode_init_once(void *foo)
3084{ 3084{
3085 ntfs_inode *ni = (ntfs_inode *)foo; 3085 ntfs_inode *ni = (ntfs_inode *)foo;
3086 3086
diff --git a/fs/ocfs2/dlm/dlmfs.c b/fs/ocfs2/dlm/dlmfs.c
index e48aba698b77..533a789c3ef8 100644
--- a/fs/ocfs2/dlm/dlmfs.c
+++ b/fs/ocfs2/dlm/dlmfs.c
@@ -267,8 +267,7 @@ static ssize_t dlmfs_file_write(struct file *filp,
267 return writelen; 267 return writelen;
268} 268}
269 269
270static void dlmfs_init_once(struct kmem_cache *cachep, 270static void dlmfs_init_once(void *foo)
271 void *foo)
272{ 271{
273 struct dlmfs_inode_private *ip = 272 struct dlmfs_inode_private *ip =
274 (struct dlmfs_inode_private *) foo; 273 (struct dlmfs_inode_private *) foo;
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
index ccecfe5094fa..2560b33889aa 100644
--- a/fs/ocfs2/super.c
+++ b/fs/ocfs2/super.c
@@ -1118,7 +1118,7 @@ bail:
1118 return status; 1118 return status;
1119} 1119}
1120 1120
1121static void ocfs2_inode_init_once(struct kmem_cache *cachep, void *data) 1121static void ocfs2_inode_init_once(void *data)
1122{ 1122{
1123 struct ocfs2_inode_info *oi = data; 1123 struct ocfs2_inode_info *oi = data;
1124 1124
diff --git a/fs/openpromfs/inode.c b/fs/openpromfs/inode.c
index d17b4fd204e1..9f5b054f06b9 100644
--- a/fs/openpromfs/inode.c
+++ b/fs/openpromfs/inode.c
@@ -430,7 +430,7 @@ static struct file_system_type openprom_fs_type = {
430 .kill_sb = kill_anon_super, 430 .kill_sb = kill_anon_super,
431}; 431};
432 432
433static void op_inode_init_once(struct kmem_cache * cachep, void *data) 433static void op_inode_init_once(void *data)
434{ 434{
435 struct op_inode_info *oi = (struct op_inode_info *) data; 435 struct op_inode_info *oi = (struct op_inode_info *) data;
436 436
diff --git a/fs/proc/inode.c b/fs/proc/inode.c
index 02eca2ed9dd7..b37f25dc45a5 100644
--- a/fs/proc/inode.c
+++ b/fs/proc/inode.c
@@ -94,7 +94,7 @@ static void proc_destroy_inode(struct inode *inode)
94 kmem_cache_free(proc_inode_cachep, PROC_I(inode)); 94 kmem_cache_free(proc_inode_cachep, PROC_I(inode));
95} 95}
96 96
97static void init_once(struct kmem_cache * cachep, void *foo) 97static void init_once(void *foo)
98{ 98{
99 struct proc_inode *ei = (struct proc_inode *) foo; 99 struct proc_inode *ei = (struct proc_inode *) foo;
100 100
diff --git a/fs/qnx4/inode.c b/fs/qnx4/inode.c
index b31ab78052b3..2aad1044b84c 100644
--- a/fs/qnx4/inode.c
+++ b/fs/qnx4/inode.c
@@ -553,7 +553,7 @@ static void qnx4_destroy_inode(struct inode *inode)
553 kmem_cache_free(qnx4_inode_cachep, qnx4_i(inode)); 553 kmem_cache_free(qnx4_inode_cachep, qnx4_i(inode));
554} 554}
555 555
556static void init_once(struct kmem_cache *cachep, void *foo) 556static void init_once(void *foo)
557{ 557{
558 struct qnx4_inode_info *ei = (struct qnx4_inode_info *) foo; 558 struct qnx4_inode_info *ei = (struct qnx4_inode_info *) foo;
559 559
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
index 2ec748ba0bd3..879e54d35c2d 100644
--- a/fs/reiserfs/super.c
+++ b/fs/reiserfs/super.c
@@ -521,7 +521,7 @@ static void reiserfs_destroy_inode(struct inode *inode)
521 kmem_cache_free(reiserfs_inode_cachep, REISERFS_I(inode)); 521 kmem_cache_free(reiserfs_inode_cachep, REISERFS_I(inode));
522} 522}
523 523
524static void init_once(struct kmem_cache * cachep, void *foo) 524static void init_once(void *foo)
525{ 525{
526 struct reiserfs_inode_info *ei = (struct reiserfs_inode_info *)foo; 526 struct reiserfs_inode_info *ei = (struct reiserfs_inode_info *)foo;
527 527
diff --git a/fs/romfs/inode.c b/fs/romfs/inode.c
index 3f13d491c7c7..8e51a2aaa977 100644
--- a/fs/romfs/inode.c
+++ b/fs/romfs/inode.c
@@ -577,7 +577,7 @@ static void romfs_destroy_inode(struct inode *inode)
577 kmem_cache_free(romfs_inode_cachep, ROMFS_I(inode)); 577 kmem_cache_free(romfs_inode_cachep, ROMFS_I(inode));
578} 578}
579 579
580static void init_once(struct kmem_cache *cachep, void *foo) 580static void init_once(void *foo)
581{ 581{
582 struct romfs_inode_info *ei = foo; 582 struct romfs_inode_info *ei = foo;
583 583
diff --git a/fs/smbfs/inode.c b/fs/smbfs/inode.c
index 376ef3ee6ed7..3528f40ffb0f 100644
--- a/fs/smbfs/inode.c
+++ b/fs/smbfs/inode.c
@@ -67,7 +67,7 @@ static void smb_destroy_inode(struct inode *inode)
67 kmem_cache_free(smb_inode_cachep, SMB_I(inode)); 67 kmem_cache_free(smb_inode_cachep, SMB_I(inode));
68} 68}
69 69
70static void init_once(struct kmem_cache *cachep, void *foo) 70static void init_once(void *foo)
71{ 71{
72 struct smb_inode_info *ei = (struct smb_inode_info *) foo; 72 struct smb_inode_info *ei = (struct smb_inode_info *) foo;
73 73
diff --git a/fs/sysv/inode.c b/fs/sysv/inode.c
index c5d60de0658f..df0d435baa48 100644
--- a/fs/sysv/inode.c
+++ b/fs/sysv/inode.c
@@ -326,7 +326,7 @@ static void sysv_destroy_inode(struct inode *inode)
326 kmem_cache_free(sysv_inode_cachep, SYSV_I(inode)); 326 kmem_cache_free(sysv_inode_cachep, SYSV_I(inode));
327} 327}
328 328
329static void init_once(struct kmem_cache *cachep, void *p) 329static void init_once(void *p)
330{ 330{
331 struct sysv_inode_info *si = (struct sysv_inode_info *)p; 331 struct sysv_inode_info *si = (struct sysv_inode_info *)p;
332 332
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index 00eb9c68ad03..ca1e2d4e03cc 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -1841,7 +1841,7 @@ static struct file_system_type ubifs_fs_type = {
1841/* 1841/*
1842 * Inode slab cache constructor. 1842 * Inode slab cache constructor.
1843 */ 1843 */
1844static void inode_slab_ctor(struct kmem_cache *cachep, void *obj) 1844static void inode_slab_ctor(void *obj)
1845{ 1845{
1846 struct ubifs_inode *ui = obj; 1846 struct ubifs_inode *ui = obj;
1847 inode_init_once(&ui->vfs_inode); 1847 inode_init_once(&ui->vfs_inode);
diff --git a/fs/udf/super.c b/fs/udf/super.c
index 44cc702f96cc..5698bbf83bbf 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -148,7 +148,7 @@ static void udf_destroy_inode(struct inode *inode)
148 kmem_cache_free(udf_inode_cachep, UDF_I(inode)); 148 kmem_cache_free(udf_inode_cachep, UDF_I(inode));
149} 149}
150 150
151static void init_once(struct kmem_cache *cachep, void *foo) 151static void init_once(void *foo)
152{ 152{
153 struct udf_inode_info *ei = (struct udf_inode_info *)foo; 153 struct udf_inode_info *ei = (struct udf_inode_info *)foo;
154 154
diff --git a/fs/ufs/super.c b/fs/ufs/super.c
index 227c9d700040..3e30e40aa24d 100644
--- a/fs/ufs/super.c
+++ b/fs/ufs/super.c
@@ -1302,7 +1302,7 @@ static void ufs_destroy_inode(struct inode *inode)
1302 kmem_cache_free(ufs_inode_cachep, UFS_I(inode)); 1302 kmem_cache_free(ufs_inode_cachep, UFS_I(inode));
1303} 1303}
1304 1304
1305static void init_once(struct kmem_cache * cachep, void *foo) 1305static void init_once(void *foo)
1306{ 1306{
1307 struct ufs_inode_info *ei = (struct ufs_inode_info *) foo; 1307 struct ufs_inode_info *ei = (struct ufs_inode_info *) foo;
1308 1308
diff --git a/fs/xfs/linux-2.6/kmem.h b/fs/xfs/linux-2.6/kmem.h
index 5e9564902976..a20683cf74dd 100644
--- a/fs/xfs/linux-2.6/kmem.h
+++ b/fs/xfs/linux-2.6/kmem.h
@@ -79,7 +79,7 @@ kmem_zone_init(int size, char *zone_name)
79 79
80static inline kmem_zone_t * 80static inline kmem_zone_t *
81kmem_zone_init_flags(int size, char *zone_name, unsigned long flags, 81kmem_zone_init_flags(int size, char *zone_name, unsigned long flags,
82 void (*construct)(kmem_zone_t *, void *)) 82 void (*construct)(void *))
83{ 83{
84 return kmem_cache_create(zone_name, size, 0, flags, construct); 84 return kmem_cache_create(zone_name, size, 0, flags, construct);
85} 85}
diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c
index 742b2c7852c1..943381284e2e 100644
--- a/fs/xfs/linux-2.6/xfs_super.c
+++ b/fs/xfs/linux-2.6/xfs_super.c
@@ -843,7 +843,6 @@ xfs_fs_destroy_inode(
843 843
844STATIC void 844STATIC void
845xfs_fs_inode_init_once( 845xfs_fs_inode_init_once(
846 kmem_zone_t *zonep,
847 void *vnode) 846 void *vnode)
848{ 847{
849 inode_init_once(vn_to_inode((bhv_vnode_t *)vnode)); 848 inode_init_once(vn_to_inode((bhv_vnode_t *)vnode));
diff --git a/include/linux/slab.h b/include/linux/slab.h
index 41103910f8a2..9ff8e8499403 100644
--- a/include/linux/slab.h
+++ b/include/linux/slab.h
@@ -58,7 +58,7 @@ int slab_is_available(void);
58 58
59struct kmem_cache *kmem_cache_create(const char *, size_t, size_t, 59struct kmem_cache *kmem_cache_create(const char *, size_t, size_t,
60 unsigned long, 60 unsigned long,
61 void (*)(struct kmem_cache *, void *)); 61 void (*)(void *));
62void kmem_cache_destroy(struct kmem_cache *); 62void kmem_cache_destroy(struct kmem_cache *);
63int kmem_cache_shrink(struct kmem_cache *); 63int kmem_cache_shrink(struct kmem_cache *);
64void kmem_cache_free(struct kmem_cache *, void *); 64void kmem_cache_free(struct kmem_cache *, void *);
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h
index d117ea2825a9..5bad61a93f65 100644
--- a/include/linux/slub_def.h
+++ b/include/linux/slub_def.h
@@ -85,7 +85,7 @@ struct kmem_cache {
85 struct kmem_cache_order_objects min; 85 struct kmem_cache_order_objects min;
86 gfp_t allocflags; /* gfp flags to use on each alloc */ 86 gfp_t allocflags; /* gfp flags to use on each alloc */
87 int refcount; /* Refcount for slab cache destroy */ 87 int refcount; /* Refcount for slab cache destroy */
88 void (*ctor)(struct kmem_cache *, void *); 88 void (*ctor)(void *);
89 int inuse; /* Offset to metadata */ 89 int inuse; /* Offset to metadata */
90 int align; /* Alignment */ 90 int align; /* Alignment */
91 const char *name; /* Name (only for display!) */ 91 const char *name; /* Name (only for display!) */
diff --git a/ipc/mqueue.c b/ipc/mqueue.c
index 1fdc2eb2f6d8..474984f9e032 100644
--- a/ipc/mqueue.c
+++ b/ipc/mqueue.c
@@ -207,7 +207,7 @@ static int mqueue_get_sb(struct file_system_type *fs_type,
207 return get_sb_single(fs_type, flags, data, mqueue_fill_super, mnt); 207 return get_sb_single(fs_type, flags, data, mqueue_fill_super, mnt);
208} 208}
209 209
210static void init_once(struct kmem_cache *cachep, void *foo) 210static void init_once(void *foo)
211{ 211{
212 struct mqueue_inode_info *p = (struct mqueue_inode_info *) foo; 212 struct mqueue_inode_info *p = (struct mqueue_inode_info *) foo;
213 213
diff --git a/kernel/fork.c b/kernel/fork.c
index b99d73e971a4..80e83e459b17 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1442,7 +1442,7 @@ long do_fork(unsigned long clone_flags,
1442#define ARCH_MIN_MMSTRUCT_ALIGN 0 1442#define ARCH_MIN_MMSTRUCT_ALIGN 0
1443#endif 1443#endif
1444 1444
1445static void sighand_ctor(struct kmem_cache *cachep, void *data) 1445static void sighand_ctor(void *data)
1446{ 1446{
1447 struct sighand_struct *sighand = data; 1447 struct sighand_struct *sighand = data;
1448 1448
diff --git a/lib/idr.c b/lib/idr.c
index 3476f8203e97..e728c7fccc4d 100644
--- a/lib/idr.c
+++ b/lib/idr.c
@@ -607,7 +607,7 @@ void *idr_replace(struct idr *idp, void *ptr, int id)
607} 607}
608EXPORT_SYMBOL(idr_replace); 608EXPORT_SYMBOL(idr_replace);
609 609
610static void idr_cache_ctor(struct kmem_cache *idr_layer_cache, void *idr_layer) 610static void idr_cache_ctor(void *idr_layer)
611{ 611{
612 memset(idr_layer, 0, sizeof(struct idr_layer)); 612 memset(idr_layer, 0, sizeof(struct idr_layer));
613} 613}
diff --git a/lib/radix-tree.c b/lib/radix-tree.c
index 9c4f1ffa2864..be86b32bc874 100644
--- a/lib/radix-tree.c
+++ b/lib/radix-tree.c
@@ -1183,7 +1183,7 @@ int radix_tree_tagged(struct radix_tree_root *root, unsigned int tag)
1183EXPORT_SYMBOL(radix_tree_tagged); 1183EXPORT_SYMBOL(radix_tree_tagged);
1184 1184
1185static void 1185static void
1186radix_tree_node_ctor(struct kmem_cache *cachep, void *node) 1186radix_tree_node_ctor(void *node)
1187{ 1187{
1188 memset(node, 0, sizeof(struct radix_tree_node)); 1188 memset(node, 0, sizeof(struct radix_tree_node));
1189} 1189}
diff --git a/mm/rmap.c b/mm/rmap.c
index abbd29f7c43f..39ae5a9bf382 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -138,7 +138,7 @@ void anon_vma_unlink(struct vm_area_struct *vma)
138 anon_vma_free(anon_vma); 138 anon_vma_free(anon_vma);
139} 139}
140 140
141static void anon_vma_ctor(struct kmem_cache *cachep, void *data) 141static void anon_vma_ctor(void *data)
142{ 142{
143 struct anon_vma *anon_vma = data; 143 struct anon_vma *anon_vma = data;
144 144
diff --git a/mm/shmem.c b/mm/shmem.c
index 1089092aecaf..952d361774bb 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -2352,7 +2352,7 @@ static void shmem_destroy_inode(struct inode *inode)
2352 kmem_cache_free(shmem_inode_cachep, SHMEM_I(inode)); 2352 kmem_cache_free(shmem_inode_cachep, SHMEM_I(inode));
2353} 2353}
2354 2354
2355static void init_once(struct kmem_cache *cachep, void *foo) 2355static void init_once(void *foo)
2356{ 2356{
2357 struct shmem_inode_info *p = (struct shmem_inode_info *) foo; 2357 struct shmem_inode_info *p = (struct shmem_inode_info *) foo;
2358 2358
diff --git a/mm/slab.c b/mm/slab.c
index 052e7d64537e..918f04f7fef1 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -406,7 +406,7 @@ struct kmem_cache {
406 unsigned int dflags; /* dynamic flags */ 406 unsigned int dflags; /* dynamic flags */
407 407
408 /* constructor func */ 408 /* constructor func */
409 void (*ctor)(struct kmem_cache *, void *); 409 void (*ctor)(void *obj);
410 410
411/* 5) cache creation/removal */ 411/* 5) cache creation/removal */
412 const char *name; 412 const char *name;
@@ -2137,8 +2137,7 @@ static int __init_refok setup_cpu_cache(struct kmem_cache *cachep)
2137 */ 2137 */
2138struct kmem_cache * 2138struct kmem_cache *
2139kmem_cache_create (const char *name, size_t size, size_t align, 2139kmem_cache_create (const char *name, size_t size, size_t align,
2140 unsigned long flags, 2140 unsigned long flags, void (*ctor)(void *))
2141 void (*ctor)(struct kmem_cache *, void *))
2142{ 2141{
2143 size_t left_over, slab_size, ralign; 2142 size_t left_over, slab_size, ralign;
2144 struct kmem_cache *cachep = NULL, *pc; 2143 struct kmem_cache *cachep = NULL, *pc;
@@ -2653,7 +2652,7 @@ static void cache_init_objs(struct kmem_cache *cachep,
2653 * They must also be threaded. 2652 * They must also be threaded.
2654 */ 2653 */
2655 if (cachep->ctor && !(cachep->flags & SLAB_POISON)) 2654 if (cachep->ctor && !(cachep->flags & SLAB_POISON))
2656 cachep->ctor(cachep, objp + obj_offset(cachep)); 2655 cachep->ctor(objp + obj_offset(cachep));
2657 2656
2658 if (cachep->flags & SLAB_RED_ZONE) { 2657 if (cachep->flags & SLAB_RED_ZONE) {
2659 if (*dbg_redzone2(cachep, objp) != RED_INACTIVE) 2658 if (*dbg_redzone2(cachep, objp) != RED_INACTIVE)
@@ -2669,7 +2668,7 @@ static void cache_init_objs(struct kmem_cache *cachep,
2669 cachep->buffer_size / PAGE_SIZE, 0); 2668 cachep->buffer_size / PAGE_SIZE, 0);
2670#else 2669#else
2671 if (cachep->ctor) 2670 if (cachep->ctor)
2672 cachep->ctor(cachep, objp); 2671 cachep->ctor(objp);
2673#endif 2672#endif
2674 slab_bufctl(slabp)[i] = i + 1; 2673 slab_bufctl(slabp)[i] = i + 1;
2675 } 2674 }
@@ -3093,7 +3092,7 @@ static void *cache_alloc_debugcheck_after(struct kmem_cache *cachep,
3093#endif 3092#endif
3094 objp += obj_offset(cachep); 3093 objp += obj_offset(cachep);
3095 if (cachep->ctor && cachep->flags & SLAB_POISON) 3094 if (cachep->ctor && cachep->flags & SLAB_POISON)
3096 cachep->ctor(cachep, objp); 3095 cachep->ctor(objp);
3097#if ARCH_SLAB_MINALIGN 3096#if ARCH_SLAB_MINALIGN
3098 if ((u32)objp & (ARCH_SLAB_MINALIGN-1)) { 3097 if ((u32)objp & (ARCH_SLAB_MINALIGN-1)) {
3099 printk(KERN_ERR "0x%p: not aligned to ARCH_SLAB_MINALIGN=%d\n", 3098 printk(KERN_ERR "0x%p: not aligned to ARCH_SLAB_MINALIGN=%d\n",
diff --git a/mm/slob.c b/mm/slob.c
index de268eb7ac70..d8fbd4d1bfa7 100644
--- a/mm/slob.c
+++ b/mm/slob.c
@@ -525,12 +525,11 @@ struct kmem_cache {
525 unsigned int size, align; 525 unsigned int size, align;
526 unsigned long flags; 526 unsigned long flags;
527 const char *name; 527 const char *name;
528 void (*ctor)(struct kmem_cache *, void *); 528 void (*ctor)(void *);
529}; 529};
530 530
531struct kmem_cache *kmem_cache_create(const char *name, size_t size, 531struct kmem_cache *kmem_cache_create(const char *name, size_t size,
532 size_t align, unsigned long flags, 532 size_t align, unsigned long flags, void (*ctor)(void *))
533 void (*ctor)(struct kmem_cache *, void *))
534{ 533{
535 struct kmem_cache *c; 534 struct kmem_cache *c;
536 535
@@ -575,7 +574,7 @@ void *kmem_cache_alloc_node(struct kmem_cache *c, gfp_t flags, int node)
575 b = slob_new_page(flags, get_order(c->size), node); 574 b = slob_new_page(flags, get_order(c->size), node);
576 575
577 if (c->ctor) 576 if (c->ctor)
578 c->ctor(c, b); 577 c->ctor(b);
579 578
580 return b; 579 return b;
581} 580}
diff --git a/mm/slub.c b/mm/slub.c
index 77c21cf53ff9..b7e2cd5d82db 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -1012,7 +1012,7 @@ __setup("slub_debug", setup_slub_debug);
1012 1012
1013static unsigned long kmem_cache_flags(unsigned long objsize, 1013static unsigned long kmem_cache_flags(unsigned long objsize,
1014 unsigned long flags, const char *name, 1014 unsigned long flags, const char *name,
1015 void (*ctor)(struct kmem_cache *, void *)) 1015 void (*ctor)(void *))
1016{ 1016{
1017 /* 1017 /*
1018 * Enable debugging if selected on the kernel commandline. 1018 * Enable debugging if selected on the kernel commandline.
@@ -1040,7 +1040,7 @@ static inline int check_object(struct kmem_cache *s, struct page *page,
1040static inline void add_full(struct kmem_cache_node *n, struct page *page) {} 1040static inline void add_full(struct kmem_cache_node *n, struct page *page) {}
1041static inline unsigned long kmem_cache_flags(unsigned long objsize, 1041static inline unsigned long kmem_cache_flags(unsigned long objsize,
1042 unsigned long flags, const char *name, 1042 unsigned long flags, const char *name,
1043 void (*ctor)(struct kmem_cache *, void *)) 1043 void (*ctor)(void *))
1044{ 1044{
1045 return flags; 1045 return flags;
1046} 1046}
@@ -1103,7 +1103,7 @@ static void setup_object(struct kmem_cache *s, struct page *page,
1103{ 1103{
1104 setup_object_debug(s, page, object); 1104 setup_object_debug(s, page, object);
1105 if (unlikely(s->ctor)) 1105 if (unlikely(s->ctor))
1106 s->ctor(s, object); 1106 s->ctor(object);
1107} 1107}
1108 1108
1109static struct page *new_slab(struct kmem_cache *s, gfp_t flags, int node) 1109static struct page *new_slab(struct kmem_cache *s, gfp_t flags, int node)
@@ -2286,7 +2286,7 @@ static int calculate_sizes(struct kmem_cache *s, int forced_order)
2286static int kmem_cache_open(struct kmem_cache *s, gfp_t gfpflags, 2286static int kmem_cache_open(struct kmem_cache *s, gfp_t gfpflags,
2287 const char *name, size_t size, 2287 const char *name, size_t size,
2288 size_t align, unsigned long flags, 2288 size_t align, unsigned long flags,
2289 void (*ctor)(struct kmem_cache *, void *)) 2289 void (*ctor)(void *))
2290{ 2290{
2291 memset(s, 0, kmem_size); 2291 memset(s, 0, kmem_size);
2292 s->name = name; 2292 s->name = name;
@@ -3042,7 +3042,7 @@ static int slab_unmergeable(struct kmem_cache *s)
3042 3042
3043static struct kmem_cache *find_mergeable(size_t size, 3043static struct kmem_cache *find_mergeable(size_t size,
3044 size_t align, unsigned long flags, const char *name, 3044 size_t align, unsigned long flags, const char *name,
3045 void (*ctor)(struct kmem_cache *, void *)) 3045 void (*ctor)(void *))
3046{ 3046{
3047 struct kmem_cache *s; 3047 struct kmem_cache *s;
3048 3048
@@ -3082,8 +3082,7 @@ static struct kmem_cache *find_mergeable(size_t size,
3082} 3082}
3083 3083
3084struct kmem_cache *kmem_cache_create(const char *name, size_t size, 3084struct kmem_cache *kmem_cache_create(const char *name, size_t size,
3085 size_t align, unsigned long flags, 3085 size_t align, unsigned long flags, void (*ctor)(void *))
3086 void (*ctor)(struct kmem_cache *, void *))
3087{ 3086{
3088 struct kmem_cache *s; 3087 struct kmem_cache *s;
3089 3088
diff --git a/net/socket.c b/net/socket.c
index 1310a82cbba7..8ef8ba81b9e2 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -265,7 +265,7 @@ static void sock_destroy_inode(struct inode *inode)
265 container_of(inode, struct socket_alloc, vfs_inode)); 265 container_of(inode, struct socket_alloc, vfs_inode));
266} 266}
267 267
268static void init_once(struct kmem_cache *cachep, void *foo) 268static void init_once(void *foo)
269{ 269{
270 struct socket_alloc *ei = (struct socket_alloc *)foo; 270 struct socket_alloc *ei = (struct socket_alloc *)foo;
271 271
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c
index 5a9b0e7828cd..23a2b8f6dc49 100644
--- a/net/sunrpc/rpc_pipe.c
+++ b/net/sunrpc/rpc_pipe.c
@@ -897,7 +897,7 @@ static struct file_system_type rpc_pipe_fs_type = {
897}; 897};
898 898
899static void 899static void
900init_once(struct kmem_cache * cachep, void *foo) 900init_once(void *foo)
901{ 901{
902 struct rpc_inode *rpci = (struct rpc_inode *) foo; 902 struct rpc_inode *rpci = (struct rpc_inode *) foo;
903 903