Commit 4ba9b9d0ba0a49d91fa6417c7510ee36f48cf957

Authored by Christoph Lameter
Committed by Linus Torvalds
1 parent b811c202a0

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>

Showing 67 changed files with 83 additions and 99 deletions Side-by-side Diff

arch/arm/plat-s3c24xx/dma.c
... ... @@ -1272,7 +1272,7 @@
1272 1272  
1273 1273 /* kmem cache implementation */
1274 1274  
1275   -static void s3c2410_dma_cache_ctor(void *p, struct kmem_cache *c, unsigned long f)
  1275 +static void s3c2410_dma_cache_ctor(struct kmem_cache *c, void *p)
1276 1276 {
1277 1277 memset(p, 0, sizeof(struct s3c2410_dma_buf));
1278 1278 }
arch/powerpc/kernel/rtas_flash.c
... ... @@ -286,7 +286,7 @@
286 286 }
287 287  
288 288 /* constructor for flash_block_cache */
289   -void rtas_block_ctor(void *ptr, struct kmem_cache *cache, unsigned long flags)
  289 +void rtas_block_ctor(struct kmem_cache *cache, void *ptr)
290 290 {
291 291 memset(ptr, 0, RTAS_BLK_SIZE);
292 292 }
arch/powerpc/mm/hugetlbpage.c
... ... @@ -526,7 +526,7 @@
526 526 return err;
527 527 }
528 528  
529   -static void zero_ctor(void *addr, struct kmem_cache *cache, unsigned long flags)
  529 +static void zero_ctor(struct kmem_cache *cache, void *addr)
530 530 {
531 531 memset(addr, 0, kmem_cache_size(cache));
532 532 }
arch/powerpc/mm/init_64.c
... ... @@ -142,7 +142,7 @@
142 142 module_init(setup_kcore);
143 143 #endif
144 144  
145   -static void zero_ctor(void *addr, struct kmem_cache *cache, unsigned long flags)
  145 +static void zero_ctor(struct kmem_cache *cache, void *addr)
146 146 {
147 147 memset(addr, 0, kmem_cache_size(cache));
148 148 }
arch/powerpc/platforms/cell/spufs/inode.c
... ... @@ -68,7 +68,7 @@
68 68 }
69 69  
70 70 static void
71   -spufs_init_once(void *p, struct kmem_cache * cachep, unsigned long flags)
  71 +spufs_init_once(struct kmem_cache *cachep, void *p)
72 72 {
73 73 struct spufs_inode_info *ei = p;
74 74  
... ... @@ -292,8 +292,7 @@
292 292 } while (pmbe);
293 293 }
294 294  
295   -static void pmb_cache_ctor(void *pmb, struct kmem_cache *cachep,
296   - unsigned long flags)
  295 +static void pmb_cache_ctor(struct kmem_cache *cachep, void *pmb)
297 296 {
298 297 struct pmb_entry *pmbe = pmb;
299 298  
arch/x86/mm/pgtable_32.c
... ... @@ -193,7 +193,7 @@
193 193 return pte;
194 194 }
195 195  
196   -void pmd_ctor(void *pmd, struct kmem_cache *cache, unsigned long flags)
  196 +void pmd_ctor(struct kmem_cache *cache, void *pmd)
197 197 {
198 198 memset(pmd, 0, PTRS_PER_PMD*sizeof(pmd_t));
199 199 }
drivers/mtd/ubi/eba.c
... ... @@ -933,8 +933,7 @@
933 933 * @cache: the lock tree entry slab cache
934 934 * @flags: constructor flags
935 935 */
936   -static void ltree_entry_ctor(void *obj, struct kmem_cache *cache,
937   - unsigned long flags)
  936 +static void ltree_entry_ctor(struct kmem_cache *cache, void *obj)
938 937 {
939 938 struct ltree_entry *le = obj;
940 939  
drivers/usb/mon/mon_text.c
... ... @@ -87,7 +87,7 @@
87 87  
88 88 static struct dentry *mon_dir; /* Usually /sys/kernel/debug/usbmon */
89 89  
90   -static void mon_text_ctor(void *, struct kmem_cache *, unsigned long);
  90 +static void mon_text_ctor(struct kmem_cache *, void *);
91 91  
92 92 struct mon_text_ptr {
93 93 int cnt, limit;
... ... @@ -720,7 +720,7 @@
720 720 /*
721 721 * Slab interface: constructor.
722 722 */
723   -static void mon_text_ctor(void *mem, struct kmem_cache *slab, unsigned long sflags)
  723 +static void mon_text_ctor(struct kmem_cache *slab, void *mem)
724 724 {
725 725 /*
726 726 * Nothing to initialize. No, really!
... ... @@ -228,7 +228,7 @@
228 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 233 struct adfs_inode_info *ei = (struct adfs_inode_info *) foo;
234 234  
... ... @@ -84,7 +84,7 @@
84 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 89 struct affs_inode_info *ei = (struct affs_inode_info *) foo;
90 90  
... ... @@ -27,8 +27,7 @@
27 27  
28 28 #define AFS_FS_MAGIC 0x6B414653 /* 'kAFS' */
29 29  
30   -static void afs_i_init_once(void *foo, struct kmem_cache *cachep,
31   - unsigned long flags);
  30 +static void afs_i_init_once(struct kmem_cache *cachep, void *foo);
32 31 static int afs_get_sb(struct file_system_type *fs_type,
33 32 int flags, const char *dev_name,
34 33 void *data, struct vfsmount *mnt);
... ... @@ -446,8 +445,7 @@
446 445 /*
447 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,
450   - unsigned long flags)
  448 +static void afs_i_init_once(struct kmem_cache *cachep, void *_vnode)
451 449 {
452 450 struct afs_vnode *vnode = _vnode;
453 451  
... ... @@ -289,7 +289,7 @@
289 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 294 struct befs_inode_info *bi = (struct befs_inode_info *) foo;
295 295  
... ... @@ -244,7 +244,7 @@
244 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 249 struct bfs_inode_info *bi = foo;
250 250  
... ... @@ -465,7 +465,7 @@
465 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 470 struct bdev_inode *ei = (struct bdev_inode *) foo;
471 471 struct block_device *bdev = &ei->bdev;
... ... @@ -704,7 +704,7 @@
704 704 };
705 705  
706 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 709 struct cifsInodeInfo *cifsi = inode;
710 710  
... ... @@ -58,7 +58,7 @@
58 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 63 struct coda_inode_info *ei = (struct coda_inode_info *) foo;
64 64  
... ... @@ -611,7 +611,7 @@
611 611 * Initializes the ecryptfs_inode_info_cache when it is created
612 612 */
613 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 616 struct ecryptfs_inode_info *ei = (struct ecryptfs_inode_info *)vptr;
617 617  
... ... @@ -622,7 +622,7 @@
622 622 struct kmem_cache **cache;
623 623 const char *name;
624 624 size_t size;
625   - void (*ctor)(void*, struct kmem_cache *, unsigned long);
  625 + void (*ctor)(struct kmem_cache *cache, void *obj);
626 626 } ecryptfs_cache_infos[] = {
627 627 {
628 628 .cache = &ecryptfs_auth_tok_list_item_cache,
... ... @@ -69,7 +69,7 @@
69 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 74 struct efs_inode_info *ei = (struct efs_inode_info *) foo;
75 75  
... ... @@ -157,7 +157,7 @@
157 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 162 struct ext2_inode_info *ei = (struct ext2_inode_info *) foo;
163 163  
... ... @@ -472,7 +472,7 @@
472 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 477 struct ext3_inode_info *ei = (struct ext3_inode_info *) foo;
478 478  
... ... @@ -523,7 +523,7 @@
523 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 528 struct ext4_inode_info *ei = (struct ext4_inode_info *) foo;
529 529  
... ... @@ -36,7 +36,7 @@
36 36  
37 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 41 struct fat_cache *cache = (struct fat_cache *)foo;
42 42  
... ... @@ -501,7 +501,7 @@
501 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 506 struct msdos_inode_info *ei = (struct msdos_inode_info *)foo;
507 507  
... ... @@ -692,8 +692,7 @@
692 692 static decl_subsys(fuse, NULL, NULL);
693 693 static decl_subsys(connections, NULL, NULL);
694 694  
695   -static void fuse_inode_init_once(void *foo, struct kmem_cache *cachep,
696   - unsigned long flags)
  695 +static void fuse_inode_init_once(struct kmem_cache *cachep, void *foo)
697 696 {
698 697 struct inode * inode = foo;
699 698  
... ... @@ -24,7 +24,7 @@
24 24 #include "util.h"
25 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 29 struct gfs2_inode *ip = foo;
30 30  
... ... @@ -34,7 +34,7 @@
34 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 39 struct gfs2_glock *gl = foo;
40 40  
... ... @@ -430,7 +430,7 @@
430 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 435 struct hfs_inode_info *i = p;
436 436  
... ... @@ -466,7 +466,7 @@
466 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 471 struct hfsplus_inode_info *i = p;
472 472  
... ... @@ -173,7 +173,7 @@
173 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 178 struct hpfs_inode_info *ei = (struct hpfs_inode_info *) foo;
179 179  
fs/hugetlbfs/inode.c
... ... @@ -697,7 +697,7 @@
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 702 struct hugetlbfs_inode_info *ei = (struct hugetlbfs_inode_info *)foo;
703 703  
... ... @@ -215,7 +215,7 @@
215 215  
216 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 220 struct inode * inode = (struct inode *) foo;
221 221  
... ... @@ -73,7 +73,7 @@
73 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 78 struct iso_inode_info *ei = foo;
79 79  
... ... @@ -43,7 +43,7 @@
43 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 48 struct jffs2_inode_info *ei = (struct jffs2_inode_info *) foo;
49 49  
fs/jfs/jfs_metapage.c
... ... @@ -180,7 +180,7 @@
180 180  
181 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 185 struct metapage *mp = (struct metapage *)foo;
186 186  
... ... @@ -750,7 +750,7 @@
750 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 755 struct jfs_inode_info *jfs_ip = (struct jfs_inode_info *) foo;
756 756  
... ... @@ -199,7 +199,7 @@
199 199 * Initialises the fields of the file lock which are invariant for
200 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 204 struct file_lock *lock = (struct file_lock *) foo;
205 205  
... ... @@ -69,7 +69,7 @@
69 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 74 struct minix_inode_info *ei = (struct minix_inode_info *) foo;
75 75  
... ... @@ -56,7 +56,7 @@
56 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 61 struct ncp_inode_info *ei = (struct ncp_inode_info *) foo;
62 62  
... ... @@ -1154,7 +1154,7 @@
1154 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 1159 struct nfs_inode *nfsi = (struct nfs_inode *) foo;
1160 1160  
... ... @@ -3080,8 +3080,7 @@
3080 3080 struct kmem_cache *ntfs_big_inode_cache;
3081 3081  
3082 3082 /* Init once constructor for the inode slab cache. */
3083   -static void ntfs_big_inode_init_once(void *foo, struct kmem_cache *cachep,
3084   - unsigned long flags)
  3083 +static void ntfs_big_inode_init_once(struct kmem_cache *cachep, void *foo)
3085 3084 {
3086 3085 ntfs_inode *ni = (ntfs_inode *)foo;
3087 3086  
fs/ocfs2/dlm/dlmfs.c
... ... @@ -255,9 +255,8 @@
255 255 return writelen;
256 256 }
257 257  
258   -static void dlmfs_init_once(void *foo,
259   - struct kmem_cache *cachep,
260   - unsigned long flags)
  258 +static void dlmfs_init_once(struct kmem_cache *cachep,
  259 + void *foo)
261 260 {
262 261 struct dlmfs_inode_private *ip =
263 262 (struct dlmfs_inode_private *) foo;
... ... @@ -1000,9 +1000,7 @@
1000 1000 return status;
1001 1001 }
1002 1002  
1003   -static void ocfs2_inode_init_once(void *data,
1004   - struct kmem_cache *cachep,
1005   - unsigned long flags)
  1003 +static void ocfs2_inode_init_once(struct kmem_cache *cachep, void *data)
1006 1004 {
1007 1005 struct ocfs2_inode_info *oi = data;
1008 1006  
fs/openpromfs/inode.c
... ... @@ -415,7 +415,7 @@
415 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 420 struct op_inode_info *oi = (struct op_inode_info *) data;
421 421  
... ... @@ -107,7 +107,7 @@
107 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 112 struct proc_inode *ei = (struct proc_inode *) foo;
113 113  
... ... @@ -536,8 +536,7 @@
536 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,
540   - unsigned long flags)
  539 +static void init_once(struct kmem_cache *cachep, void *foo)
541 540 {
542 541 struct qnx4_inode_info *ei = (struct qnx4_inode_info *) foo;
543 542  
... ... @@ -508,7 +508,7 @@
508 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 513 struct reiserfs_inode_info *ei = (struct reiserfs_inode_info *)foo;
514 514  
... ... @@ -566,7 +566,7 @@
566 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 571 struct romfs_inode_info *ei = foo;
572 572  
... ... @@ -67,7 +67,7 @@
67 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 72 struct smb_inode_info *ei = (struct smb_inode_info *) foo;
73 73  
... ... @@ -318,7 +318,7 @@
318 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 323 struct sysv_inode_info *si = (struct sysv_inode_info *)p;
324 324  
... ... @@ -134,7 +134,7 @@
134 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 139 struct udf_inode_info *ei = (struct udf_inode_info *)foo;
140 140  
... ... @@ -1232,7 +1232,7 @@
1232 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 1237 struct ufs_inode_info *ei = (struct ufs_inode_info *) foo;
1238 1238  
fs/xfs/linux-2.6/kmem.h
... ... @@ -79,7 +79,7 @@
79 79  
80 80 static inline kmem_zone_t *
81 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 84 return kmem_cache_create(zone_name, size, 0, flags, construct);
85 85 }
fs/xfs/linux-2.6/xfs_super.c
... ... @@ -356,9 +356,8 @@
356 356  
357 357 STATIC void
358 358 xfs_fs_inode_init_once(
359   - void *vnode,
360 359 kmem_zone_t *zonep,
361   - unsigned long flags)
  360 + void *vnode)
362 361 {
363 362 inode_init_once(vn_to_inode((bhv_vnode_t *)vnode));
364 363 }
include/asm-x86/pgtable_32.h
... ... @@ -40,7 +40,7 @@
40 40 extern struct page *pgd_list;
41 41 void check_pgt_cache(void);
42 42  
43   -void pmd_ctor(void *, struct kmem_cache *, unsigned long);
  43 +void pmd_ctor(struct kmem_cache *, void *);
44 44 void pgtable_cache_init(void);
45 45 void paging_init(void);
46 46  
include/linux/slab.h
... ... @@ -53,7 +53,7 @@
53 53  
54 54 struct kmem_cache *kmem_cache_create(const char *, size_t, size_t,
55 55 unsigned long,
56   - void (*)(void *, struct kmem_cache *, unsigned long));
  56 + void (*)(struct kmem_cache *, void *));
57 57 void kmem_cache_destroy(struct kmem_cache *);
58 58 int kmem_cache_shrink(struct kmem_cache *);
59 59 void kmem_cache_free(struct kmem_cache *, void *);
include/linux/slub_def.h
... ... @@ -49,7 +49,7 @@
49 49 /* Allocation and freeing of slabs */
50 50 int objects; /* Number of objects in slab */
51 51 int refcount; /* Refcount for slab cache destroy */
52   - void (*ctor)(void *, struct kmem_cache *, unsigned long);
  52 + void (*ctor)(struct kmem_cache *, void *);
53 53 int inuse; /* Offset to metadata */
54 54 int align; /* Alignment */
55 55 const char *name; /* Name (only for display!) */
... ... @@ -211,7 +211,7 @@
211 211 return get_sb_single(fs_type, flags, data, mqueue_fill_super, mnt);
212 212 }
213 213  
214   -static void init_once(void *foo, struct kmem_cache * cachep, unsigned long flags)
  214 +static void init_once(struct kmem_cache *cachep, void *foo)
215 215 {
216 216 struct mqueue_inode_info *p = (struct mqueue_inode_info *) foo;
217 217  
... ... @@ -1445,8 +1445,7 @@
1445 1445 #define ARCH_MIN_MMSTRUCT_ALIGN 0
1446 1446 #endif
1447 1447  
1448   -static void sighand_ctor(void *data, struct kmem_cache *cachep,
1449   - unsigned long flags)
  1448 +static void sighand_ctor(struct kmem_cache *cachep, void *data)
1450 1449 {
1451 1450 struct sighand_struct *sighand = data;
1452 1451  
... ... @@ -580,8 +580,7 @@
580 580 }
581 581 EXPORT_SYMBOL(idr_replace);
582 582  
583   -static void idr_cache_ctor(void * idr_layer, struct kmem_cache *idr_layer_cache,
584   - unsigned long flags)
  583 +static void idr_cache_ctor(struct kmem_cache *idr_layer_cache, void *idr_layer)
585 584 {
586 585 memset(idr_layer, 0, sizeof(struct idr_layer));
587 586 }
... ... @@ -1042,7 +1042,7 @@
1042 1042 EXPORT_SYMBOL(radix_tree_tagged);
1043 1043  
1044 1044 static void
1045   -radix_tree_node_ctor(void *node, struct kmem_cache *cachep, unsigned long flags)
  1045 +radix_tree_node_ctor(struct kmem_cache *cachep, void *node)
1046 1046 {
1047 1047 memset(node, 0, sizeof(struct radix_tree_node));
1048 1048 }
... ... @@ -137,8 +137,7 @@
137 137 anon_vma_free(anon_vma);
138 138 }
139 139  
140   -static void anon_vma_ctor(void *data, struct kmem_cache *cachep,
141   - unsigned long flags)
  140 +static void anon_vma_ctor(struct kmem_cache *cachep, void *data)
142 141 {
143 142 struct anon_vma *anon_vma = data;
144 143  
... ... @@ -2328,8 +2328,7 @@
2328 2328 kmem_cache_free(shmem_inode_cachep, SHMEM_I(inode));
2329 2329 }
2330 2330  
2331   -static void init_once(void *foo, struct kmem_cache *cachep,
2332   - unsigned long flags)
  2331 +static void init_once(struct kmem_cache *cachep, void *foo)
2333 2332 {
2334 2333 struct shmem_inode_info *p = (struct shmem_inode_info *) foo;
2335 2334  
... ... @@ -408,7 +408,7 @@
408 408 unsigned int dflags; /* dynamic flags */
409 409  
410 410 /* constructor func */
411   - void (*ctor) (void *, struct kmem_cache *, unsigned long);
  411 + void (*ctor)(struct kmem_cache *, void *);
412 412  
413 413 /* 5) cache creation/removal */
414 414 const char *name;
... ... @@ -2129,7 +2129,7 @@
2129 2129 struct kmem_cache *
2130 2130 kmem_cache_create (const char *name, size_t size, size_t align,
2131 2131 unsigned long flags,
2132   - void (*ctor)(void*, struct kmem_cache *, unsigned long))
  2132 + void (*ctor)(struct kmem_cache *, void *))
2133 2133 {
2134 2134 size_t left_over, slab_size, ralign;
2135 2135 struct kmem_cache *cachep = NULL, *pc;
... ... @@ -2636,8 +2636,7 @@
2636 2636 * They must also be threaded.
2637 2637 */
2638 2638 if (cachep->ctor && !(cachep->flags & SLAB_POISON))
2639   - cachep->ctor(objp + obj_offset(cachep), cachep,
2640   - 0);
  2639 + cachep->ctor(cachep, objp + obj_offset(cachep));
2641 2640  
2642 2641 if (cachep->flags & SLAB_RED_ZONE) {
2643 2642 if (*dbg_redzone2(cachep, objp) != RED_INACTIVE)
... ... @@ -2653,7 +2652,7 @@
2653 2652 cachep->buffer_size / PAGE_SIZE, 0);
2654 2653 #else
2655 2654 if (cachep->ctor)
2656   - cachep->ctor(objp, cachep, 0);
  2655 + cachep->ctor(cachep, objp);
2657 2656 #endif
2658 2657 slab_bufctl(slabp)[i] = i + 1;
2659 2658 }
... ... @@ -3078,7 +3077,7 @@
3078 3077 #endif
3079 3078 objp += obj_offset(cachep);
3080 3079 if (cachep->ctor && cachep->flags & SLAB_POISON)
3081   - cachep->ctor(objp, cachep, 0);
  3080 + cachep->ctor(cachep, objp);
3082 3081 #if ARCH_SLAB_MINALIGN
3083 3082 if ((u32)objp & (ARCH_SLAB_MINALIGN-1)) {
3084 3083 printk(KERN_ERR "0x%p: not aligned to ARCH_SLAB_MINALIGN=%d\n",
... ... @@ -499,12 +499,12 @@
499 499 unsigned int size, align;
500 500 unsigned long flags;
501 501 const char *name;
502   - void (*ctor)(void *, struct kmem_cache *, unsigned long);
  502 + void (*ctor)(struct kmem_cache *, void *);
503 503 };
504 504  
505 505 struct kmem_cache *kmem_cache_create(const char *name, size_t size,
506 506 size_t align, unsigned long flags,
507   - void (*ctor)(void*, struct kmem_cache *, unsigned long))
  507 + void (*ctor)(struct kmem_cache *, void *))
508 508 {
509 509 struct kmem_cache *c;
510 510  
... ... @@ -548,7 +548,7 @@
548 548 b = slob_new_page(flags, get_order(c->size), node);
549 549  
550 550 if (c->ctor)
551   - c->ctor(b, c, 0);
  551 + c->ctor(c, b);
552 552  
553 553 return b;
554 554 }
... ... @@ -980,7 +980,7 @@
980 980  
981 981 static unsigned long kmem_cache_flags(unsigned long objsize,
982 982 unsigned long flags, const char *name,
983   - void (*ctor)(void *, struct kmem_cache *, unsigned long))
  983 + void (*ctor)(struct kmem_cache *, void *))
984 984 {
985 985 /*
986 986 * The page->offset field is only 16 bit wide. This is an offset
... ... @@ -1027,7 +1027,7 @@
1027 1027 static inline void add_full(struct kmem_cache_node *n, struct page *page) {}
1028 1028 static inline unsigned long kmem_cache_flags(unsigned long objsize,
1029 1029 unsigned long flags, const char *name,
1030   - void (*ctor)(void *, struct kmem_cache *, unsigned long))
  1030 + void (*ctor)(struct kmem_cache *, void *))
1031 1031 {
1032 1032 return flags;
1033 1033 }
... ... @@ -1071,7 +1071,7 @@
1071 1071 {
1072 1072 setup_object_debug(s, page, object);
1073 1073 if (unlikely(s->ctor))
1074   - s->ctor(object, s, 0);
  1074 + s->ctor(s, object);
1075 1075 }
1076 1076  
1077 1077 static struct page *new_slab(struct kmem_cache *s, gfp_t flags, int node)
... ... @@ -2211,7 +2211,7 @@
2211 2211 static int kmem_cache_open(struct kmem_cache *s, gfp_t gfpflags,
2212 2212 const char *name, size_t size,
2213 2213 size_t align, unsigned long flags,
2214   - void (*ctor)(void *, struct kmem_cache *, unsigned long))
  2214 + void (*ctor)(struct kmem_cache *, void *))
2215 2215 {
2216 2216 memset(s, 0, kmem_size);
2217 2217 s->name = name;
... ... @@ -2801,7 +2801,7 @@
2801 2801  
2802 2802 static struct kmem_cache *find_mergeable(size_t size,
2803 2803 size_t align, unsigned long flags, const char *name,
2804   - void (*ctor)(void *, struct kmem_cache *, unsigned long))
  2804 + void (*ctor)(struct kmem_cache *, void *))
2805 2805 {
2806 2806 struct kmem_cache *s;
2807 2807  
... ... @@ -2842,7 +2842,7 @@
2842 2842  
2843 2843 struct kmem_cache *kmem_cache_create(const char *name, size_t size,
2844 2844 size_t align, unsigned long flags,
2845   - void (*ctor)(void *, struct kmem_cache *, unsigned long))
  2845 + void (*ctor)(struct kmem_cache *, void *))
2846 2846 {
2847 2847 struct kmem_cache *s;
2848 2848  
... ... @@ -258,7 +258,7 @@
258 258 container_of(inode, struct socket_alloc, vfs_inode));
259 259 }
260 260  
261   -static void init_once(void *foo, struct kmem_cache *cachep, unsigned long flags)
  261 +static void init_once(struct kmem_cache *cachep, void *foo)
262 262 {
263 263 struct socket_alloc *ei = (struct socket_alloc *)foo;
264 264  
net/sunrpc/rpc_pipe.c
... ... @@ -842,7 +842,7 @@
842 842 };
843 843  
844 844 static void
845   -init_once(void * foo, struct kmem_cache * cachep, unsigned long flags)
  845 +init_once(struct kmem_cache * cachep, void *foo)
846 846 {
847 847 struct rpc_inode *rpci = (struct rpc_inode *) foo;
848 848