diff options
author | Christoph Lameter <clameter@sgi.com> | 2007-10-17 02:25:51 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-17 11:42:45 -0400 |
commit | 4ba9b9d0ba0a49d91fa6417c7510ee36f48cf957 (patch) | |
tree | 191b4f45f926e44b882b1e87a9a85dc12230b892 /fs | |
parent | b811c202a0edadaac7242ab834fe7ba409978ae7 (diff) |
Slab API: remove useless ctor parameter and reorder parameters
Slab constructors currently have a flags parameter that is never used. And
the order of the arguments is opposite to other slab functions. The object
pointer is placed before the kmem_cache pointer.
Convert
ctor(void *object, struct kmem_cache *s, unsigned long flags)
to
ctor(struct kmem_cache *s, void *object)
throughout the kernel
[akpm@linux-foundation.org: coupla fixes]
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
44 files changed, 48 insertions, 57 deletions
diff --git a/fs/adfs/super.c b/fs/adfs/super.c index 1c9fd3029496..b36695ae5c2e 100644 --- a/fs/adfs/super.c +++ b/fs/adfs/super.c | |||
@@ -228,7 +228,7 @@ static void adfs_destroy_inode(struct inode *inode) | |||
228 | kmem_cache_free(adfs_inode_cachep, ADFS_I(inode)); | 228 | kmem_cache_free(adfs_inode_cachep, ADFS_I(inode)); |
229 | } | 229 | } |
230 | 230 | ||
231 | static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flags) | 231 | static void init_once(struct kmem_cache *cachep, void *foo) |
232 | { | 232 | { |
233 | struct adfs_inode_info *ei = (struct adfs_inode_info *) foo; | 233 | struct adfs_inode_info *ei = (struct adfs_inode_info *) foo; |
234 | 234 | ||
diff --git a/fs/affs/super.c b/fs/affs/super.c index c80191ae2059..b53e5d0ec65c 100644 --- a/fs/affs/super.c +++ b/fs/affs/super.c | |||
@@ -84,7 +84,7 @@ static void affs_destroy_inode(struct inode *inode) | |||
84 | kmem_cache_free(affs_inode_cachep, AFFS_I(inode)); | 84 | kmem_cache_free(affs_inode_cachep, AFFS_I(inode)); |
85 | } | 85 | } |
86 | 86 | ||
87 | static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flags) | 87 | static void init_once(struct kmem_cache *cachep, void *foo) |
88 | { | 88 | { |
89 | struct affs_inode_info *ei = (struct affs_inode_info *) foo; | 89 | struct affs_inode_info *ei = (struct affs_inode_info *) foo; |
90 | 90 | ||
diff --git a/fs/afs/super.c b/fs/afs/super.c index b8808b40f82b..4b2558c42213 100644 --- a/fs/afs/super.c +++ b/fs/afs/super.c | |||
@@ -27,8 +27,7 @@ | |||
27 | 27 | ||
28 | #define AFS_FS_MAGIC 0x6B414653 /* 'kAFS' */ | 28 | #define AFS_FS_MAGIC 0x6B414653 /* 'kAFS' */ |
29 | 29 | ||
30 | static void afs_i_init_once(void *foo, struct kmem_cache *cachep, | 30 | static void afs_i_init_once(struct kmem_cache *cachep, void *foo); |
31 | unsigned long flags); | ||
32 | static int afs_get_sb(struct file_system_type *fs_type, | 31 | static int afs_get_sb(struct file_system_type *fs_type, |
33 | int flags, const char *dev_name, | 32 | int flags, const char *dev_name, |
34 | void *data, struct vfsmount *mnt); | 33 | void *data, struct vfsmount *mnt); |
@@ -446,8 +445,7 @@ static void afs_put_super(struct super_block *sb) | |||
446 | /* | 445 | /* |
447 | * initialise an inode cache slab element prior to any use | 446 | * initialise an inode cache slab element prior to any use |
448 | */ | 447 | */ |
449 | static void afs_i_init_once(void *_vnode, struct kmem_cache *cachep, | 448 | static void afs_i_init_once(struct kmem_cache *cachep, void *_vnode) |
450 | unsigned long flags) | ||
451 | { | 449 | { |
452 | struct afs_vnode *vnode = _vnode; | 450 | struct afs_vnode *vnode = _vnode; |
453 | 451 | ||
diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c index a45141827681..b28a20e61b80 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 | ||
292 | static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flags) | 292 | static void init_once(struct kmem_cache *cachep, 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 f346eb14e86f..7bd9c2bbe6ee 100644 --- a/fs/bfs/inode.c +++ b/fs/bfs/inode.c | |||
@@ -244,7 +244,7 @@ static void bfs_destroy_inode(struct inode *inode) | |||
244 | kmem_cache_free(bfs_inode_cachep, BFS_I(inode)); | 244 | kmem_cache_free(bfs_inode_cachep, BFS_I(inode)); |
245 | } | 245 | } |
246 | 246 | ||
247 | static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flags) | 247 | static void init_once(struct kmem_cache *cachep, void *foo) |
248 | { | 248 | { |
249 | struct bfs_inode_info *bi = foo; | 249 | struct bfs_inode_info *bi = foo; |
250 | 250 | ||
diff --git a/fs/block_dev.c b/fs/block_dev.c index 379a446e243e..993f78c55221 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c | |||
@@ -465,7 +465,7 @@ static void bdev_destroy_inode(struct inode *inode) | |||
465 | kmem_cache_free(bdev_cachep, bdi); | 465 | kmem_cache_free(bdev_cachep, bdi); |
466 | } | 466 | } |
467 | 467 | ||
468 | static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flags) | 468 | static void init_once(struct kmem_cache * cachep, void *foo) |
469 | { | 469 | { |
470 | struct bdev_inode *ei = (struct bdev_inode *) foo; | 470 | struct bdev_inode *ei = (struct bdev_inode *) foo; |
471 | struct block_device *bdev = &ei->bdev; | 471 | struct block_device *bdev = &ei->bdev; |
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index cabb6a55d7dd..ba8f7868cb23 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c | |||
@@ -704,7 +704,7 @@ const struct file_operations cifs_dir_ops = { | |||
704 | }; | 704 | }; |
705 | 705 | ||
706 | static void | 706 | static void |
707 | cifs_init_once(void *inode, struct kmem_cache *cachep, unsigned long flags) | 707 | cifs_init_once(struct kmem_cache *cachep, void *inode) |
708 | { | 708 | { |
709 | struct cifsInodeInfo *cifsi = inode; | 709 | struct cifsInodeInfo *cifsi = inode; |
710 | 710 | ||
diff --git a/fs/coda/inode.c b/fs/coda/inode.c index 342f4e0d582e..2f58dfc70083 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 | ||
61 | static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flags) | 61 | static void init_once(struct kmem_cache * cachep, 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 97e6801f722c..bceee53a11fe 100644 --- a/fs/ecryptfs/main.c +++ b/fs/ecryptfs/main.c | |||
@@ -611,7 +611,7 @@ static struct file_system_type ecryptfs_fs_type = { | |||
611 | * Initializes the ecryptfs_inode_info_cache when it is created | 611 | * Initializes the ecryptfs_inode_info_cache when it is created |
612 | */ | 612 | */ |
613 | static void | 613 | static void |
614 | inode_info_init_once(void *vptr, struct kmem_cache *cachep, unsigned long flags) | 614 | inode_info_init_once(struct kmem_cache *cachep, void *vptr) |
615 | { | 615 | { |
616 | struct ecryptfs_inode_info *ei = (struct ecryptfs_inode_info *)vptr; | 616 | struct ecryptfs_inode_info *ei = (struct ecryptfs_inode_info *)vptr; |
617 | 617 | ||
@@ -622,7 +622,7 @@ static struct ecryptfs_cache_info { | |||
622 | struct kmem_cache **cache; | 622 | struct kmem_cache **cache; |
623 | const char *name; | 623 | const char *name; |
624 | size_t size; | 624 | size_t size; |
625 | void (*ctor)(void*, struct kmem_cache *, unsigned long); | 625 | void (*ctor)(struct kmem_cache *cache, void *obj); |
626 | } ecryptfs_cache_infos[] = { | 626 | } ecryptfs_cache_infos[] = { |
627 | { | 627 | { |
628 | .cache = &ecryptfs_auth_tok_list_item_cache, | 628 | .cache = &ecryptfs_auth_tok_list_item_cache, |
diff --git a/fs/efs/super.c b/fs/efs/super.c index ce4acb8ff819..25d0326c5f1c 100644 --- a/fs/efs/super.c +++ b/fs/efs/super.c | |||
@@ -69,7 +69,7 @@ static void efs_destroy_inode(struct inode *inode) | |||
69 | kmem_cache_free(efs_inode_cachep, INODE_INFO(inode)); | 69 | kmem_cache_free(efs_inode_cachep, INODE_INFO(inode)); |
70 | } | 70 | } |
71 | 71 | ||
72 | static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flags) | 72 | static void init_once(struct kmem_cache *cachep, void *foo) |
73 | { | 73 | { |
74 | struct efs_inode_info *ei = (struct efs_inode_info *) foo; | 74 | struct efs_inode_info *ei = (struct efs_inode_info *) foo; |
75 | 75 | ||
diff --git a/fs/ext2/super.c b/fs/ext2/super.c index 2690e460f2ef..04bc96caa7b2 100644 --- a/fs/ext2/super.c +++ b/fs/ext2/super.c | |||
@@ -157,7 +157,7 @@ static void ext2_destroy_inode(struct inode *inode) | |||
157 | kmem_cache_free(ext2_inode_cachep, EXT2_I(inode)); | 157 | kmem_cache_free(ext2_inode_cachep, EXT2_I(inode)); |
158 | } | 158 | } |
159 | 159 | ||
160 | static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flags) | 160 | static void init_once(struct kmem_cache * cachep, void *foo) |
161 | { | 161 | { |
162 | struct ext2_inode_info *ei = (struct ext2_inode_info *) foo; | 162 | struct ext2_inode_info *ei = (struct ext2_inode_info *) foo; |
163 | 163 | ||
diff --git a/fs/ext3/super.c b/fs/ext3/super.c index ac5c6b0ecd64..775d0bb0bd13 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 | ||
475 | static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flags) | 475 | static void init_once(struct kmem_cache * cachep, 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 157c64c9a4e7..22158ebfae2a 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c | |||
@@ -523,7 +523,7 @@ static void ext4_destroy_inode(struct inode *inode) | |||
523 | kmem_cache_free(ext4_inode_cachep, EXT4_I(inode)); | 523 | kmem_cache_free(ext4_inode_cachep, EXT4_I(inode)); |
524 | } | 524 | } |
525 | 525 | ||
526 | static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flags) | 526 | static void init_once(struct kmem_cache *cachep, void *foo) |
527 | { | 527 | { |
528 | struct ext4_inode_info *ei = (struct ext4_inode_info *) foo; | 528 | struct ext4_inode_info *ei = (struct ext4_inode_info *) foo; |
529 | 529 | ||
diff --git a/fs/fat/cache.c b/fs/fat/cache.c index be6f89b152ca..639b3b4f86d1 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 | ||
37 | static struct kmem_cache *fat_cache_cachep; | 37 | static struct kmem_cache *fat_cache_cachep; |
38 | 38 | ||
39 | static void init_once(void *foo, struct kmem_cache *cachep, unsigned long flags) | 39 | static void init_once(struct kmem_cache *cachep, 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 46b8a67f55c6..c0c5e9c55b58 100644 --- a/fs/fat/inode.c +++ b/fs/fat/inode.c | |||
@@ -501,7 +501,7 @@ static void fat_destroy_inode(struct inode *inode) | |||
501 | kmem_cache_free(fat_inode_cachep, MSDOS_I(inode)); | 501 | kmem_cache_free(fat_inode_cachep, MSDOS_I(inode)); |
502 | } | 502 | } |
503 | 503 | ||
504 | static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flags) | 504 | static void init_once(struct kmem_cache *cachep, void *foo) |
505 | { | 505 | { |
506 | struct msdos_inode_info *ei = (struct msdos_inode_info *)foo; | 506 | struct msdos_inode_info *ei = (struct msdos_inode_info *)foo; |
507 | 507 | ||
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index ca30b6ac03f0..807988445685 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c | |||
@@ -692,8 +692,7 @@ static inline void unregister_fuseblk(void) | |||
692 | static decl_subsys(fuse, NULL, NULL); | 692 | static decl_subsys(fuse, NULL, NULL); |
693 | static decl_subsys(connections, NULL, NULL); | 693 | static decl_subsys(connections, NULL, NULL); |
694 | 694 | ||
695 | static void fuse_inode_init_once(void *foo, struct kmem_cache *cachep, | 695 | static void fuse_inode_init_once(struct kmem_cache *cachep, void *foo) |
696 | unsigned long flags) | ||
697 | { | 696 | { |
698 | struct inode * inode = foo; | 697 | struct inode * inode = foo; |
699 | 698 | ||
diff --git a/fs/gfs2/main.c b/fs/gfs2/main.c index 79c91fd8381b..7ecfe0d3a491 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 | ||
27 | static void gfs2_init_inode_once(void *foo, struct kmem_cache *cachep, unsigned long flags) | 27 | static void gfs2_init_inode_once(struct kmem_cache *cachep, void *foo) |
28 | { | 28 | { |
29 | struct gfs2_inode *ip = foo; | 29 | struct gfs2_inode *ip = foo; |
30 | 30 | ||
@@ -34,7 +34,7 @@ static void gfs2_init_inode_once(void *foo, struct kmem_cache *cachep, unsigned | |||
34 | memset(ip->i_cache, 0, sizeof(ip->i_cache)); | 34 | memset(ip->i_cache, 0, sizeof(ip->i_cache)); |
35 | } | 35 | } |
36 | 36 | ||
37 | static void gfs2_init_glock_once(void *foo, struct kmem_cache *cachep, unsigned long flags) | 37 | static void gfs2_init_glock_once(struct kmem_cache *cachep, void *foo) |
38 | { | 38 | { |
39 | struct gfs2_glock *gl = foo; | 39 | struct gfs2_glock *gl = foo; |
40 | 40 | ||
diff --git a/fs/hfs/super.c b/fs/hfs/super.c index 6c5f92dfb500..16cbd902f8b9 100644 --- a/fs/hfs/super.c +++ b/fs/hfs/super.c | |||
@@ -430,7 +430,7 @@ static struct file_system_type hfs_fs_type = { | |||
430 | .fs_flags = FS_REQUIRES_DEV, | 430 | .fs_flags = FS_REQUIRES_DEV, |
431 | }; | 431 | }; |
432 | 432 | ||
433 | static void hfs_init_once(void *p, struct kmem_cache *cachep, unsigned long flags) | 433 | static void hfs_init_once(struct kmem_cache *cachep, void *p) |
434 | { | 434 | { |
435 | struct hfs_inode_info *i = p; | 435 | struct hfs_inode_info *i = p; |
436 | 436 | ||
diff --git a/fs/hfsplus/super.c b/fs/hfsplus/super.c index 7b0f2e5a44e2..ecf70dafb643 100644 --- a/fs/hfsplus/super.c +++ b/fs/hfsplus/super.c | |||
@@ -466,7 +466,7 @@ static struct file_system_type hfsplus_fs_type = { | |||
466 | .fs_flags = FS_REQUIRES_DEV, | 466 | .fs_flags = FS_REQUIRES_DEV, |
467 | }; | 467 | }; |
468 | 468 | ||
469 | static void hfsplus_init_once(void *p, struct kmem_cache *cachep, unsigned long flags) | 469 | static void hfsplus_init_once(struct kmem_cache *cachep, void *p) |
470 | { | 470 | { |
471 | struct hfsplus_inode_info *i = p; | 471 | struct hfsplus_inode_info *i = p; |
472 | 472 | ||
diff --git a/fs/hpfs/super.c b/fs/hpfs/super.c index 89612ee7c80d..00971d999964 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 | ||
176 | static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flags) | 176 | static void init_once(struct kmem_cache *cachep, 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 0d9a2055ddee..6bf6890f0530 100644 --- a/fs/hugetlbfs/inode.c +++ b/fs/hugetlbfs/inode.c | |||
@@ -697,7 +697,7 @@ static const struct address_space_operations hugetlbfs_aops = { | |||
697 | }; | 697 | }; |
698 | 698 | ||
699 | 699 | ||
700 | static void init_once(void *foo, struct kmem_cache *cachep, unsigned long flags) | 700 | static void init_once(struct kmem_cache *cachep, void *foo) |
701 | { | 701 | { |
702 | struct hugetlbfs_inode_info *ei = (struct hugetlbfs_inode_info *)foo; | 702 | struct hugetlbfs_inode_info *ei = (struct hugetlbfs_inode_info *)foo; |
703 | 703 | ||
diff --git a/fs/inode.c b/fs/inode.c index 21dab18b2f18..ee93b3e67977 100644 --- a/fs/inode.c +++ b/fs/inode.c | |||
@@ -215,7 +215,7 @@ void inode_init_once(struct inode *inode) | |||
215 | 215 | ||
216 | EXPORT_SYMBOL(inode_init_once); | 216 | EXPORT_SYMBOL(inode_init_once); |
217 | 217 | ||
218 | static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flags) | 218 | static void init_once(struct kmem_cache * cachep, void *foo) |
219 | { | 219 | { |
220 | struct inode * inode = (struct inode *) foo; | 220 | struct inode * inode = (struct inode *) foo; |
221 | 221 | ||
diff --git a/fs/isofs/inode.c b/fs/isofs/inode.c index 043b470fd3b6..aa359a2e4ce6 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 | ||
76 | static void init_once(void *foo, struct kmem_cache *cachep, unsigned long flags) | 76 | static void init_once(struct kmem_cache *cachep, 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 be2b70c2ec16..ffa447511e6a 100644 --- a/fs/jffs2/super.c +++ b/fs/jffs2/super.c | |||
@@ -43,7 +43,7 @@ static void jffs2_destroy_inode(struct inode *inode) | |||
43 | kmem_cache_free(jffs2_inode_cachep, JFFS2_INODE_INFO(inode)); | 43 | kmem_cache_free(jffs2_inode_cachep, JFFS2_INODE_INFO(inode)); |
44 | } | 44 | } |
45 | 45 | ||
46 | static void jffs2_i_init_once(void * foo, struct kmem_cache * cachep, unsigned long flags) | 46 | static void jffs2_i_init_once(struct kmem_cache *cachep, void *foo) |
47 | { | 47 | { |
48 | struct jffs2_inode_info *ei = (struct jffs2_inode_info *) foo; | 48 | struct jffs2_inode_info *ei = (struct jffs2_inode_info *) foo; |
49 | 49 | ||
diff --git a/fs/jfs/jfs_metapage.c b/fs/jfs/jfs_metapage.c index 941369c1ac8d..f5cd8d38af7a 100644 --- a/fs/jfs/jfs_metapage.c +++ b/fs/jfs/jfs_metapage.c | |||
@@ -180,7 +180,7 @@ static inline void remove_metapage(struct page *page, struct metapage *mp) | |||
180 | 180 | ||
181 | #endif | 181 | #endif |
182 | 182 | ||
183 | static void init_once(void *foo, struct kmem_cache *cachep, unsigned long flags) | 183 | static void init_once(struct kmem_cache *cachep, void *foo) |
184 | { | 184 | { |
185 | struct metapage *mp = (struct metapage *)foo; | 185 | struct metapage *mp = (struct metapage *)foo; |
186 | 186 | ||
diff --git a/fs/jfs/super.c b/fs/jfs/super.c index 4b372f550652..cff60c171943 100644 --- a/fs/jfs/super.c +++ b/fs/jfs/super.c | |||
@@ -750,7 +750,7 @@ static struct file_system_type jfs_fs_type = { | |||
750 | .fs_flags = FS_REQUIRES_DEV, | 750 | .fs_flags = FS_REQUIRES_DEV, |
751 | }; | 751 | }; |
752 | 752 | ||
753 | static void init_once(void *foo, struct kmem_cache * cachep, unsigned long flags) | 753 | static void init_once(struct kmem_cache *cachep, void *foo) |
754 | { | 754 | { |
755 | struct jfs_inode_info *jfs_ip = (struct jfs_inode_info *) foo; | 755 | struct jfs_inode_info *jfs_ip = (struct jfs_inode_info *) foo; |
756 | 756 | ||
diff --git a/fs/locks.c b/fs/locks.c index 7f9a3ea47418..0127a2846819 100644 --- a/fs/locks.c +++ b/fs/locks.c | |||
@@ -199,7 +199,7 @@ EXPORT_SYMBOL(locks_init_lock); | |||
199 | * Initialises the fields of the file lock which are invariant for | 199 | * Initialises the fields of the file lock which are invariant for |
200 | * free file_locks. | 200 | * free file_locks. |
201 | */ | 201 | */ |
202 | static void init_once(void *foo, struct kmem_cache *cache, unsigned long flags) | 202 | static void init_once(struct kmem_cache *cache, void *foo) |
203 | { | 203 | { |
204 | struct file_lock *lock = (struct file_lock *) foo; | 204 | struct file_lock *lock = (struct file_lock *) foo; |
205 | 205 | ||
diff --git a/fs/minix/inode.c b/fs/minix/inode.c index f4f3343b1800..bf4cd316af81 100644 --- a/fs/minix/inode.c +++ b/fs/minix/inode.c | |||
@@ -69,7 +69,7 @@ static void minix_destroy_inode(struct inode *inode) | |||
69 | kmem_cache_free(minix_inode_cachep, minix_i(inode)); | 69 | kmem_cache_free(minix_inode_cachep, minix_i(inode)); |
70 | } | 70 | } |
71 | 71 | ||
72 | static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flags) | 72 | static void init_once(struct kmem_cache * cachep, void *foo) |
73 | { | 73 | { |
74 | struct minix_inode_info *ei = (struct minix_inode_info *) foo; | 74 | struct minix_inode_info *ei = (struct minix_inode_info *) foo; |
75 | 75 | ||
diff --git a/fs/ncpfs/inode.c b/fs/ncpfs/inode.c index 7f8536dbdedc..e1cb70c643f8 100644 --- a/fs/ncpfs/inode.c +++ b/fs/ncpfs/inode.c | |||
@@ -56,7 +56,7 @@ static void ncp_destroy_inode(struct inode *inode) | |||
56 | kmem_cache_free(ncp_inode_cachep, NCP_FINFO(inode)); | 56 | kmem_cache_free(ncp_inode_cachep, NCP_FINFO(inode)); |
57 | } | 57 | } |
58 | 58 | ||
59 | static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flags) | 59 | static void init_once(struct kmem_cache *cachep, void *foo) |
60 | { | 60 | { |
61 | struct ncp_inode_info *ei = (struct ncp_inode_info *) foo; | 61 | struct ncp_inode_info *ei = (struct ncp_inode_info *) foo; |
62 | 62 | ||
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 035c769b715e..6c22453d77ae 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c | |||
@@ -1154,7 +1154,7 @@ static inline void nfs4_init_once(struct nfs_inode *nfsi) | |||
1154 | #endif | 1154 | #endif |
1155 | } | 1155 | } |
1156 | 1156 | ||
1157 | static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flags) | 1157 | static void init_once(struct kmem_cache * cachep, void *foo) |
1158 | { | 1158 | { |
1159 | struct nfs_inode *nfsi = (struct nfs_inode *) foo; | 1159 | struct nfs_inode *nfsi = (struct nfs_inode *) foo; |
1160 | 1160 | ||
diff --git a/fs/ntfs/super.c b/fs/ntfs/super.c index 90c4e3a29706..ad2124573024 100644 --- a/fs/ntfs/super.c +++ b/fs/ntfs/super.c | |||
@@ -3080,8 +3080,7 @@ struct kmem_cache *ntfs_inode_cache; | |||
3080 | struct kmem_cache *ntfs_big_inode_cache; | 3080 | struct 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. */ |
3083 | static void ntfs_big_inode_init_once(void *foo, struct kmem_cache *cachep, | 3083 | static void ntfs_big_inode_init_once(struct kmem_cache *cachep, void *foo) |
3084 | unsigned long flags) | ||
3085 | { | 3084 | { |
3086 | ntfs_inode *ni = (ntfs_inode *)foo; | 3085 | ntfs_inode *ni = (ntfs_inode *)foo; |
3087 | 3086 | ||
diff --git a/fs/ocfs2/dlm/dlmfs.c b/fs/ocfs2/dlm/dlmfs.c index 1150412758ac..6639baab0798 100644 --- a/fs/ocfs2/dlm/dlmfs.c +++ b/fs/ocfs2/dlm/dlmfs.c | |||
@@ -255,9 +255,8 @@ static ssize_t dlmfs_file_write(struct file *filp, | |||
255 | return writelen; | 255 | return writelen; |
256 | } | 256 | } |
257 | 257 | ||
258 | static void dlmfs_init_once(void *foo, | 258 | static void dlmfs_init_once(struct kmem_cache *cachep, |
259 | struct kmem_cache *cachep, | 259 | void *foo) |
260 | unsigned long flags) | ||
261 | { | 260 | { |
262 | struct dlmfs_inode_private *ip = | 261 | struct dlmfs_inode_private *ip = |
263 | (struct dlmfs_inode_private *) foo; | 262 | (struct dlmfs_inode_private *) foo; |
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c index 0e2a1b45bf92..be562ac3e89c 100644 --- a/fs/ocfs2/super.c +++ b/fs/ocfs2/super.c | |||
@@ -1000,9 +1000,7 @@ bail: | |||
1000 | return status; | 1000 | return status; |
1001 | } | 1001 | } |
1002 | 1002 | ||
1003 | static void ocfs2_inode_init_once(void *data, | 1003 | static void ocfs2_inode_init_once(struct kmem_cache *cachep, void *data) |
1004 | struct kmem_cache *cachep, | ||
1005 | unsigned long flags) | ||
1006 | { | 1004 | { |
1007 | struct ocfs2_inode_info *oi = data; | 1005 | struct ocfs2_inode_info *oi = data; |
1008 | 1006 | ||
diff --git a/fs/openpromfs/inode.c b/fs/openpromfs/inode.c index dd86be2aa6c9..d88173840082 100644 --- a/fs/openpromfs/inode.c +++ b/fs/openpromfs/inode.c | |||
@@ -415,7 +415,7 @@ static struct file_system_type openprom_fs_type = { | |||
415 | .kill_sb = kill_anon_super, | 415 | .kill_sb = kill_anon_super, |
416 | }; | 416 | }; |
417 | 417 | ||
418 | static void op_inode_init_once(void *data, struct kmem_cache * cachep, unsigned long flags) | 418 | static void op_inode_init_once(struct kmem_cache * cachep, void *data) |
419 | { | 419 | { |
420 | struct op_inode_info *oi = (struct op_inode_info *) data; | 420 | struct op_inode_info *oi = (struct op_inode_info *) data; |
421 | 421 | ||
diff --git a/fs/proc/inode.c b/fs/proc/inode.c index 0e4d37c93eea..7cffa433a3c8 100644 --- a/fs/proc/inode.c +++ b/fs/proc/inode.c | |||
@@ -107,7 +107,7 @@ static void proc_destroy_inode(struct inode *inode) | |||
107 | kmem_cache_free(proc_inode_cachep, PROC_I(inode)); | 107 | kmem_cache_free(proc_inode_cachep, PROC_I(inode)); |
108 | } | 108 | } |
109 | 109 | ||
110 | static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flags) | 110 | static void init_once(struct kmem_cache * cachep, void *foo) |
111 | { | 111 | { |
112 | struct proc_inode *ei = (struct proc_inode *) foo; | 112 | struct proc_inode *ei = (struct proc_inode *) foo; |
113 | 113 | ||
diff --git a/fs/qnx4/inode.c b/fs/qnx4/inode.c index df8bd87e49b7..638bdb963213 100644 --- a/fs/qnx4/inode.c +++ b/fs/qnx4/inode.c | |||
@@ -536,8 +536,7 @@ static void qnx4_destroy_inode(struct inode *inode) | |||
536 | kmem_cache_free(qnx4_inode_cachep, qnx4_i(inode)); | 536 | kmem_cache_free(qnx4_inode_cachep, qnx4_i(inode)); |
537 | } | 537 | } |
538 | 538 | ||
539 | static void init_once(void *foo, struct kmem_cache * cachep, | 539 | static void init_once(struct kmem_cache *cachep, void *foo) |
540 | unsigned long flags) | ||
541 | { | 540 | { |
542 | struct qnx4_inode_info *ei = (struct qnx4_inode_info *) foo; | 541 | struct qnx4_inode_info *ei = (struct qnx4_inode_info *) foo; |
543 | 542 | ||
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c index a005451930b7..edfd74f9f7e4 100644 --- a/fs/reiserfs/super.c +++ b/fs/reiserfs/super.c | |||
@@ -508,7 +508,7 @@ static void reiserfs_destroy_inode(struct inode *inode) | |||
508 | kmem_cache_free(reiserfs_inode_cachep, REISERFS_I(inode)); | 508 | kmem_cache_free(reiserfs_inode_cachep, REISERFS_I(inode)); |
509 | } | 509 | } |
510 | 510 | ||
511 | static void init_once(void *foo, struct kmem_cache * cachep, unsigned long flags) | 511 | static void init_once(struct kmem_cache * cachep, void *foo) |
512 | { | 512 | { |
513 | struct reiserfs_inode_info *ei = (struct reiserfs_inode_info *)foo; | 513 | struct reiserfs_inode_info *ei = (struct reiserfs_inode_info *)foo; |
514 | 514 | ||
diff --git a/fs/romfs/inode.c b/fs/romfs/inode.c index dae7945f90e4..7c5e5f573b05 100644 --- a/fs/romfs/inode.c +++ b/fs/romfs/inode.c | |||
@@ -566,7 +566,7 @@ static void romfs_destroy_inode(struct inode *inode) | |||
566 | kmem_cache_free(romfs_inode_cachep, ROMFS_I(inode)); | 566 | kmem_cache_free(romfs_inode_cachep, ROMFS_I(inode)); |
567 | } | 567 | } |
568 | 568 | ||
569 | static void init_once(void *foo, struct kmem_cache *cachep, unsigned long flags) | 569 | static void init_once(struct kmem_cache *cachep, void *foo) |
570 | { | 570 | { |
571 | struct romfs_inode_info *ei = foo; | 571 | struct romfs_inode_info *ei = foo; |
572 | 572 | ||
diff --git a/fs/smbfs/inode.c b/fs/smbfs/inode.c index 73d1450a95d4..ab517755ece0 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 | ||
70 | static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flags) | 70 | static void init_once(struct kmem_cache *cachep, 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 7c4e5d302abb..81ec6c548c07 100644 --- a/fs/sysv/inode.c +++ b/fs/sysv/inode.c | |||
@@ -318,7 +318,7 @@ static void sysv_destroy_inode(struct inode *inode) | |||
318 | kmem_cache_free(sysv_inode_cachep, SYSV_I(inode)); | 318 | kmem_cache_free(sysv_inode_cachep, SYSV_I(inode)); |
319 | } | 319 | } |
320 | 320 | ||
321 | static void init_once(void *p, struct kmem_cache *cachep, unsigned long flags) | 321 | static void init_once(struct kmem_cache *cachep, void *p) |
322 | { | 322 | { |
323 | struct sysv_inode_info *si = (struct sysv_inode_info *)p; | 323 | struct sysv_inode_info *si = (struct sysv_inode_info *)p; |
324 | 324 | ||
diff --git a/fs/udf/super.c b/fs/udf/super.c index c68a6e730b97..f175c9bf3b9c 100644 --- a/fs/udf/super.c +++ b/fs/udf/super.c | |||
@@ -134,7 +134,7 @@ static void udf_destroy_inode(struct inode *inode) | |||
134 | kmem_cache_free(udf_inode_cachep, UDF_I(inode)); | 134 | kmem_cache_free(udf_inode_cachep, UDF_I(inode)); |
135 | } | 135 | } |
136 | 136 | ||
137 | static void init_once(void *foo, struct kmem_cache *cachep, unsigned long flags) | 137 | static void init_once(struct kmem_cache *cachep, void *foo) |
138 | { | 138 | { |
139 | struct udf_inode_info *ei = (struct udf_inode_info *)foo; | 139 | struct udf_inode_info *ei = (struct udf_inode_info *)foo; |
140 | 140 | ||
diff --git a/fs/ufs/super.c b/fs/ufs/super.c index 38eb0b7a1f3d..c5bdea7c23a9 100644 --- a/fs/ufs/super.c +++ b/fs/ufs/super.c | |||
@@ -1232,7 +1232,7 @@ static void ufs_destroy_inode(struct inode *inode) | |||
1232 | kmem_cache_free(ufs_inode_cachep, UFS_I(inode)); | 1232 | kmem_cache_free(ufs_inode_cachep, UFS_I(inode)); |
1233 | } | 1233 | } |
1234 | 1234 | ||
1235 | static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flags) | 1235 | static void init_once(struct kmem_cache * cachep, void *foo) |
1236 | { | 1236 | { |
1237 | struct ufs_inode_info *ei = (struct ufs_inode_info *) foo; | 1237 | struct ufs_inode_info *ei = (struct ufs_inode_info *) foo; |
1238 | 1238 | ||
diff --git a/fs/xfs/linux-2.6/kmem.h b/fs/xfs/linux-2.6/kmem.h index e6ea293f303c..5e9564902976 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 | ||
80 | static inline kmem_zone_t * | 80 | static inline kmem_zone_t * |
81 | kmem_zone_init_flags(int size, char *zone_name, unsigned long flags, | 81 | kmem_zone_init_flags(int size, char *zone_name, unsigned long flags, |
82 | void (*construct)(void *, kmem_zone_t *, unsigned long)) | 82 | void (*construct)(kmem_zone_t *, 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 491d1f4f202d..9c7d8202088f 100644 --- a/fs/xfs/linux-2.6/xfs_super.c +++ b/fs/xfs/linux-2.6/xfs_super.c | |||
@@ -356,9 +356,8 @@ xfs_fs_destroy_inode( | |||
356 | 356 | ||
357 | STATIC void | 357 | STATIC void |
358 | xfs_fs_inode_init_once( | 358 | xfs_fs_inode_init_once( |
359 | void *vnode, | ||
360 | kmem_zone_t *zonep, | 359 | kmem_zone_t *zonep, |
361 | unsigned long flags) | 360 | void *vnode) |
362 | { | 361 | { |
363 | inode_init_once(vn_to_inode((bhv_vnode_t *)vnode)); | 362 | inode_init_once(vn_to_inode((bhv_vnode_t *)vnode)); |
364 | } | 363 | } |