]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Slab API: remove useless ctor parameter and reorder parameters
authorChristoph Lameter <clameter@sgi.com>
Wed, 17 Oct 2007 06:25:51 +0000 (23:25 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 17 Oct 2007 15:42:45 +0000 (08:42 -0700)
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>
67 files changed:
arch/arm/plat-s3c24xx/dma.c
arch/powerpc/kernel/rtas_flash.c
arch/powerpc/mm/hugetlbpage.c
arch/powerpc/mm/init_64.c
arch/powerpc/platforms/cell/spufs/inode.c
arch/sh/mm/pmb.c
arch/x86/mm/pgtable_32.c
drivers/mtd/ubi/eba.c
drivers/usb/mon/mon_text.c
fs/adfs/super.c
fs/affs/super.c
fs/afs/super.c
fs/befs/linuxvfs.c
fs/bfs/inode.c
fs/block_dev.c
fs/cifs/cifsfs.c
fs/coda/inode.c
fs/ecryptfs/main.c
fs/efs/super.c
fs/ext2/super.c
fs/ext3/super.c
fs/ext4/super.c
fs/fat/cache.c
fs/fat/inode.c
fs/fuse/inode.c
fs/gfs2/main.c
fs/hfs/super.c
fs/hfsplus/super.c
fs/hpfs/super.c
fs/hugetlbfs/inode.c
fs/inode.c
fs/isofs/inode.c
fs/jffs2/super.c
fs/jfs/jfs_metapage.c
fs/jfs/super.c
fs/locks.c
fs/minix/inode.c
fs/ncpfs/inode.c
fs/nfs/inode.c
fs/ntfs/super.c
fs/ocfs2/dlm/dlmfs.c
fs/ocfs2/super.c
fs/openpromfs/inode.c
fs/proc/inode.c
fs/qnx4/inode.c
fs/reiserfs/super.c
fs/romfs/inode.c
fs/smbfs/inode.c
fs/sysv/inode.c
fs/udf/super.c
fs/ufs/super.c
fs/xfs/linux-2.6/kmem.h
fs/xfs/linux-2.6/xfs_super.c
include/asm-x86/pgtable_32.h
include/linux/slab.h
include/linux/slub_def.h
ipc/mqueue.c
kernel/fork.c
lib/idr.c
lib/radix-tree.c
mm/rmap.c
mm/shmem.c
mm/slab.c
mm/slob.c
mm/slub.c
net/socket.c
net/sunrpc/rpc_pipe.c

index 992ca435a9222a0cf4241ec632135878cfb21a01..29696e46ed659bab0fdb00cc5fc0f17aaf8f1040 100644 (file)
@@ -1272,7 +1272,7 @@ struct sysdev_class dma_sysclass = {
 
 /* kmem cache implementation */
 
-static void s3c2410_dma_cache_ctor(void *p, struct kmem_cache *c, unsigned long f)
+static void s3c2410_dma_cache_ctor(struct kmem_cache *c, void *p)
 {
        memset(p, 0, sizeof(struct s3c2410_dma_buf));
 }
index 62b7bf2f3eab5a9fd77738d3689e167298900fa1..f2276593f41648c7dc00330458622d63bca14b9b 100644 (file)
@@ -286,7 +286,7 @@ static ssize_t rtas_flash_read(struct file *file, char __user *buf,
 }
 
 /* constructor for flash_block_cache */
-void rtas_block_ctor(void *ptr, struct kmem_cache *cache, unsigned long flags)
+void rtas_block_ctor(struct kmem_cache *cache, void *ptr)
 {
        memset(ptr, 0, RTAS_BLK_SIZE);
 }
index 08f0d9ff7712cb64d9a2be9c69f4786db1d93216..71efb38d599be75490f61ca929a160ea8f86ab8c 100644 (file)
@@ -526,7 +526,7 @@ repeat:
        return err;
 }
 
-static void zero_ctor(void *addr, struct kmem_cache *cache, unsigned long flags)
+static void zero_ctor(struct kmem_cache *cache, void *addr)
 {
        memset(addr, 0, kmem_cache_size(cache));
 }
index 702d884a338a2f5da89bb1ee4b03297670cb47e0..e91da675bb3bc1cd4a74fa865c9abe80d2ab5fbd 100644 (file)
@@ -142,7 +142,7 @@ static int __init setup_kcore(void)
 module_init(setup_kcore);
 #endif
 
-static void zero_ctor(void *addr, struct kmem_cache *cache, unsigned long flags)
+static void zero_ctor(struct kmem_cache *cache, void *addr)
 {
        memset(addr, 0, kmem_cache_size(cache));
 }
index 11098747d09b42445d090423f04e82e44025be28..0966d093db4321925baf4fb6057c1760c01a1bf6 100644 (file)
@@ -68,7 +68,7 @@ spufs_destroy_inode(struct inode *inode)
 }
 
 static void
-spufs_init_once(void *p, struct kmem_cache * cachep, unsigned long flags)
+spufs_init_once(struct kmem_cache *cachep, void *p)
 {
        struct spufs_inode_info *ei = p;
 
index 7d43758dc2442276fe9391a6b75ac823d1e0454b..1d45b82f0a638e12ef1afb939feafc2a39b95612 100644 (file)
@@ -292,8 +292,7 @@ void pmb_unmap(unsigned long addr)
        } while (pmbe);
 }
 
-static void pmb_cache_ctor(void *pmb, struct kmem_cache *cachep,
-                          unsigned long flags)
+static void pmb_cache_ctor(struct kmem_cache *cachep, void *pmb)
 {
        struct pmb_entry *pmbe = pmb;
 
index 01437c46baae9302e9770f4925d47cd14d8f0f78..ef1f6cd3ea66d7cacce1c70ee2d22106bfe82e3f 100644 (file)
@@ -193,7 +193,7 @@ struct page *pte_alloc_one(struct mm_struct *mm, unsigned long address)
        return pte;
 }
 
-void pmd_ctor(void *pmd, struct kmem_cache *cache, unsigned long flags)
+void pmd_ctor(struct kmem_cache *cache, void *pmd)
 {
        memset(pmd, 0, PTRS_PER_PMD*sizeof(pmd_t));
 }
index 1297732f4db95c4275e9f3f78b81345d48787572..880fa369035296bbd85e5f8027249a78f59d42f3 100644 (file)
@@ -933,8 +933,7 @@ write_error:
  * @cache: the lock tree entry slab cache
  * @flags: constructor flags
  */
-static void ltree_entry_ctor(void *obj, struct kmem_cache *cache,
-                            unsigned long flags)
+static void ltree_entry_ctor(struct kmem_cache *cache, void *obj)
 {
        struct ltree_entry *le = obj;
 
index ebb04ac4857b2019d234cedb37631a877a63dbc0..5e3e4e9b6c77040c46cecefca82714ecbc4f4af1 100644 (file)
@@ -87,7 +87,7 @@ struct mon_reader_text {
 
 static struct dentry *mon_dir;         /* Usually /sys/kernel/debug/usbmon */
 
-static void mon_text_ctor(void *, struct kmem_cache *, unsigned long);
+static void mon_text_ctor(struct kmem_cache *, void *);
 
 struct mon_text_ptr {
        int cnt, limit;
@@ -720,7 +720,7 @@ void mon_text_del(struct mon_bus *mbus)
 /*
  * Slab interface: constructor.
  */
-static void mon_text_ctor(void *mem, struct kmem_cache *slab, unsigned long sflags)
+static void mon_text_ctor(struct kmem_cache *slab, void *mem)
 {
        /*
         * Nothing to initialize. No, really!
index 1c9fd3029496f577a69252b119adc817ff26fe85..b36695ae5c2e9ff97b06ae999f0f1baaf01dd333 100644 (file)
@@ -228,7 +228,7 @@ static void adfs_destroy_inode(struct inode *inode)
        kmem_cache_free(adfs_inode_cachep, ADFS_I(inode));
 }
 
-static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flags)
+static void init_once(struct kmem_cache *cachep, void *foo)
 {
        struct adfs_inode_info *ei = (struct adfs_inode_info *) foo;
 
index c80191ae2059d751ee413a244892934ba39b9733..b53e5d0ec65c4b3fd52417dab5c85cdd176ebb76 100644 (file)
@@ -84,7 +84,7 @@ static void affs_destroy_inode(struct inode *inode)
        kmem_cache_free(affs_inode_cachep, AFFS_I(inode));
 }
 
-static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flags)
+static void init_once(struct kmem_cache *cachep, void *foo)
 {
        struct affs_inode_info *ei = (struct affs_inode_info *) foo;
 
index b8808b40f82b3c01f35fb37e3c88a67a36775170..4b2558c42213c5e79328fe71ef0b2380f07b8405 100644 (file)
@@ -27,8 +27,7 @@
 
 #define AFS_FS_MAGIC 0x6B414653 /* 'kAFS' */
 
-static void afs_i_init_once(void *foo, struct kmem_cache *cachep,
-                           unsigned long flags);
+static void afs_i_init_once(struct kmem_cache *cachep, void *foo);
 static int afs_get_sb(struct file_system_type *fs_type,
                      int flags, const char *dev_name,
                      void *data, struct vfsmount *mnt);
@@ -446,8 +445,7 @@ static void afs_put_super(struct super_block *sb)
 /*
  * initialise an inode cache slab element prior to any use
  */
-static void afs_i_init_once(void *_vnode, struct kmem_cache *cachep,
-                           unsigned long flags)
+static void afs_i_init_once(struct kmem_cache *cachep, void *_vnode)
 {
        struct afs_vnode *vnode = _vnode;
 
index a45141827681c9294518cbbb1185033dcdd2dcc4..b28a20e61b8061f294ea24d0037f183550fa1e7d 100644 (file)
@@ -289,7 +289,7 @@ befs_destroy_inode(struct inode *inode)
         kmem_cache_free(befs_inode_cachep, BEFS_I(inode));
 }
 
-static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flags)
+static void init_once(struct kmem_cache *cachep, void *foo)
 {
         struct befs_inode_info *bi = (struct befs_inode_info *) foo;
 
index f346eb14e86f37b88a820a7231eb10dc19414fd6..7bd9c2bbe6ee61e5d48485d80b9b0b3096512370 100644 (file)
@@ -244,7 +244,7 @@ static void bfs_destroy_inode(struct inode *inode)
        kmem_cache_free(bfs_inode_cachep, BFS_I(inode));
 }
 
-static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flags)
+static void init_once(struct kmem_cache *cachep, void *foo)
 {
        struct bfs_inode_info *bi = foo;
 
index 379a446e243e05c82e92968931e4214794747344..993f78c55221c4c4083ac72114afceadfafd12fe 100644 (file)
@@ -465,7 +465,7 @@ static void bdev_destroy_inode(struct inode *inode)
        kmem_cache_free(bdev_cachep, bdi);
 }
 
-static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flags)
+static void init_once(struct kmem_cache * cachep, void *foo)
 {
        struct bdev_inode *ei = (struct bdev_inode *) foo;
        struct block_device *bdev = &ei->bdev;
index cabb6a55d7ddaf2d3e19ce22ae1c20e38fd5ff0b..ba8f7868cb23c84a5e713910f7b7d5a72bfc6f8a 100644 (file)
@@ -704,7 +704,7 @@ const struct file_operations cifs_dir_ops = {
 };
 
 static void
-cifs_init_once(void *inode, struct kmem_cache *cachep, unsigned long flags)
+cifs_init_once(struct kmem_cache *cachep, void *inode)
 {
        struct cifsInodeInfo *cifsi = inode;
 
index 342f4e0d582e6468ff41eaaab4eac3f2674b3552..2f58dfc70083536004ea5f1d8945be4650c27992 100644 (file)
@@ -58,7 +58,7 @@ static void coda_destroy_inode(struct inode *inode)
        kmem_cache_free(coda_inode_cachep, ITOC(inode));
 }
 
-static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flags)
+static void init_once(struct kmem_cache * cachep, void *foo)
 {
        struct coda_inode_info *ei = (struct coda_inode_info *) foo;
 
index 97e6801f722cef2c87354fed3e31dd2e56238f5e..bceee53a11fe24aa9909aa17a0fda586d6a5ec89 100644 (file)
@@ -611,7 +611,7 @@ static struct file_system_type ecryptfs_fs_type = {
  * Initializes the ecryptfs_inode_info_cache when it is created
  */
 static void
-inode_info_init_once(void *vptr, struct kmem_cache *cachep, unsigned long flags)
+inode_info_init_once(struct kmem_cache *cachep, void *vptr)
 {
        struct ecryptfs_inode_info *ei = (struct ecryptfs_inode_info *)vptr;
 
@@ -622,7 +622,7 @@ static struct ecryptfs_cache_info {
        struct kmem_cache **cache;
        const char *name;
        size_t size;
-       void (*ctor)(void*, struct kmem_cache *, unsigned long);
+       void (*ctor)(struct kmem_cache *cache, void *obj);
 } ecryptfs_cache_infos[] = {
        {
                .cache = &ecryptfs_auth_tok_list_item_cache,
index ce4acb8ff819a70b4f76733bd804c7d72e0beb2b..25d0326c5f1c9a6c44b220c89e5bd94a9f32c6be 100644 (file)
@@ -69,7 +69,7 @@ static void efs_destroy_inode(struct inode *inode)
        kmem_cache_free(efs_inode_cachep, INODE_INFO(inode));
 }
 
-static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flags)
+static void init_once(struct kmem_cache *cachep, void *foo)
 {
        struct efs_inode_info *ei = (struct efs_inode_info *) foo;
 
index 2690e460f2ef668b808d5afe8817cd1ffbd94b0f..04bc96caa7b2e6dfe797018032a8ffcbdbaee0f0 100644 (file)
@@ -157,7 +157,7 @@ static void ext2_destroy_inode(struct inode *inode)
        kmem_cache_free(ext2_inode_cachep, EXT2_I(inode));
 }
 
-static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flags)
+static void init_once(struct kmem_cache * cachep, void *foo)
 {
        struct ext2_inode_info *ei = (struct ext2_inode_info *) foo;
 
index ac5c6b0ecd641b213ef94c5257b5c5c5c36f47f0..775d0bb0bd13f161645856746d5734f26f177c23 100644 (file)
@@ -472,7 +472,7 @@ static void ext3_destroy_inode(struct inode *inode)
        kmem_cache_free(ext3_inode_cachep, EXT3_I(inode));
 }
 
-static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flags)
+static void init_once(struct kmem_cache * cachep, void *foo)
 {
        struct ext3_inode_info *ei = (struct ext3_inode_info *) foo;
 
index 157c64c9a4e773f134efe4b3292d3202fbf7118b..22158ebfae2a50e1ec63febac2561bba880e6fdd 100644 (file)
@@ -523,7 +523,7 @@ static void ext4_destroy_inode(struct inode *inode)
        kmem_cache_free(ext4_inode_cachep, EXT4_I(inode));
 }
 
-static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flags)
+static void init_once(struct kmem_cache *cachep, void *foo)
 {
        struct ext4_inode_info *ei = (struct ext4_inode_info *) foo;
 
index be6f89b152caf6e69d3afb160eb508c65e46bd26..639b3b4f86d15a8a17a331a3fabdbb16d0bc8048 100644 (file)
@@ -36,7 +36,7 @@ static inline int fat_max_cache(struct inode *inode)
 
 static struct kmem_cache *fat_cache_cachep;
 
-static void init_once(void *foo, struct kmem_cache *cachep, unsigned long flags)
+static void init_once(struct kmem_cache *cachep, void *foo)
 {
        struct fat_cache *cache = (struct fat_cache *)foo;
 
index 46b8a67f55c6ae9235f507f1b587922702327c96..c0c5e9c55b588c37264deb5be91bb42c64d1f2a0 100644 (file)
@@ -501,7 +501,7 @@ static void fat_destroy_inode(struct inode *inode)
        kmem_cache_free(fat_inode_cachep, MSDOS_I(inode));
 }
 
-static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flags)
+static void init_once(struct kmem_cache *cachep, void *foo)
 {
        struct msdos_inode_info *ei = (struct msdos_inode_info *)foo;
 
index ca30b6ac03f056dcf845c2e9e3f0e521159cb060..8079884456854509313920883559b48c75fb7718 100644 (file)
@@ -692,8 +692,7 @@ static inline void unregister_fuseblk(void)
 static decl_subsys(fuse, NULL, NULL);
 static decl_subsys(connections, NULL, NULL);
 
-static void fuse_inode_init_once(void *foo, struct kmem_cache *cachep,
-                                unsigned long flags)
+static void fuse_inode_init_once(struct kmem_cache *cachep, void *foo)
 {
        struct inode * inode = foo;
 
index 79c91fd8381bc11d61bba006daba21a1cf713f81..7ecfe0d3a4913e7d5dc2396599526cb2f781527f 100644 (file)
@@ -24,7 +24,7 @@
 #include "util.h"
 #include "glock.h"
 
-static void gfs2_init_inode_once(void *foo, struct kmem_cache *cachep, unsigned long flags)
+static void gfs2_init_inode_once(struct kmem_cache *cachep, void *foo)
 {
        struct gfs2_inode *ip = foo;
 
@@ -34,7 +34,7 @@ static void gfs2_init_inode_once(void *foo, struct kmem_cache *cachep, unsigned
        memset(ip->i_cache, 0, sizeof(ip->i_cache));
 }
 
-static void gfs2_init_glock_once(void *foo, struct kmem_cache *cachep, unsigned long flags)
+static void gfs2_init_glock_once(struct kmem_cache *cachep, void *foo)
 {
        struct gfs2_glock *gl = foo;
 
index 6c5f92dfb50036105ba5de2739572a5036cf23b0..16cbd902f8b9569a6874710832d7ab1316010063 100644 (file)
@@ -430,7 +430,7 @@ static struct file_system_type hfs_fs_type = {
        .fs_flags       = FS_REQUIRES_DEV,
 };
 
-static void hfs_init_once(void *p, struct kmem_cache *cachep, unsigned long flags)
+static void hfs_init_once(struct kmem_cache *cachep, void *p)
 {
        struct hfs_inode_info *i = p;
 
index 7b0f2e5a44e2bce847c9c3e59c141c4a4821639f..ecf70dafb643718e7a91c1c8238290aa16c2fc5a 100644 (file)
@@ -466,7 +466,7 @@ static struct file_system_type hfsplus_fs_type = {
        .fs_flags       = FS_REQUIRES_DEV,
 };
 
-static void hfsplus_init_once(void *p, struct kmem_cache *cachep, unsigned long flags)
+static void hfsplus_init_once(struct kmem_cache *cachep, void *p)
 {
        struct hfsplus_inode_info *i = p;
 
index 89612ee7c80d6d9ffb5370ecb83f7716e1427f05..00971d999964848884187593fb744ef16888620a 100644 (file)
@@ -173,7 +173,7 @@ static void hpfs_destroy_inode(struct inode *inode)
        kmem_cache_free(hpfs_inode_cachep, hpfs_i(inode));
 }
 
-static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flags)
+static void init_once(struct kmem_cache *cachep, void *foo)
 {
        struct hpfs_inode_info *ei = (struct hpfs_inode_info *) foo;
 
index 0d9a2055ddee7acb15831d3b1469ec0cc2f21337..6bf6890f05304c7b6547f07d4019aec4e0edcada 100644 (file)
@@ -697,7 +697,7 @@ static const struct address_space_operations hugetlbfs_aops = {
 };
 
 
-static void init_once(void *foo, struct kmem_cache *cachep, unsigned long flags)
+static void init_once(struct kmem_cache *cachep, void *foo)
 {
        struct hugetlbfs_inode_info *ei = (struct hugetlbfs_inode_info *)foo;
 
index 21dab18b2f18641ba24cd119f99be6391fb615bb..ee93b3e679776c6a6763061e48f6411616c720e5 100644 (file)
@@ -215,7 +215,7 @@ void inode_init_once(struct inode *inode)
 
 EXPORT_SYMBOL(inode_init_once);
 
-static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flags)
+static void init_once(struct kmem_cache * cachep, void *foo)
 {
        struct inode * inode = (struct inode *) foo;
 
index 043b470fd3b67f42c325dbb90997730b2a38c84d..aa359a2e4ce613cb49710e94f248846789fbde4f 100644 (file)
@@ -73,7 +73,7 @@ static void isofs_destroy_inode(struct inode *inode)
        kmem_cache_free(isofs_inode_cachep, ISOFS_I(inode));
 }
 
-static void init_once(void *foo, struct kmem_cache *cachep, unsigned long flags)
+static void init_once(struct kmem_cache *cachep, void *foo)
 {
        struct iso_inode_info *ei = foo;
 
index be2b70c2ec1653890df1c08aae864293e47a6b50..ffa447511e6a38d5cb6f194eb8c64a51878b91fd 100644 (file)
@@ -43,7 +43,7 @@ static void jffs2_destroy_inode(struct inode *inode)
        kmem_cache_free(jffs2_inode_cachep, JFFS2_INODE_INFO(inode));
 }
 
-static void jffs2_i_init_once(void * foo, struct kmem_cache * cachep, unsigned long flags)
+static void jffs2_i_init_once(struct kmem_cache *cachep, void *foo)
 {
        struct jffs2_inode_info *ei = (struct jffs2_inode_info *) foo;
 
index 941369c1ac8dcd5ab20f93736b02494202c9e974..f5cd8d38af7a9ff7af5ac2f4627d73964ccd5814 100644 (file)
@@ -180,7 +180,7 @@ static inline void remove_metapage(struct page *page, struct metapage *mp)
 
 #endif
 
-static void init_once(void *foo, struct kmem_cache *cachep, unsigned long flags)
+static void init_once(struct kmem_cache *cachep, void *foo)
 {
        struct metapage *mp = (struct metapage *)foo;
 
index 4b372f550652686f5202af80e481f948ba3dba20..cff60c171943b9b23334428bd650ac829fc19b7b 100644 (file)
@@ -750,7 +750,7 @@ static struct file_system_type jfs_fs_type = {
        .fs_flags       = FS_REQUIRES_DEV,
 };
 
-static void init_once(void *foo, struct kmem_cache * cachep, unsigned long flags)
+static void init_once(struct kmem_cache *cachep, void *foo)
 {
        struct jfs_inode_info *jfs_ip = (struct jfs_inode_info *) foo;
 
index 7f9a3ea47418cf598b3084be4efd96b9884a10bf..0127a2846819148df5b9a8722118e11ed60e253b 100644 (file)
@@ -199,7 +199,7 @@ EXPORT_SYMBOL(locks_init_lock);
  * Initialises the fields of the file lock which are invariant for
  * free file_locks.
  */
-static void init_once(void *foo, struct kmem_cache *cache, unsigned long flags)
+static void init_once(struct kmem_cache *cache, void *foo)
 {
        struct file_lock *lock = (struct file_lock *) foo;
 
index f4f3343b1800fa816e4e1d0e08e13fb1b36e2310..bf4cd316af81cb91b602d2a06895756461becc5e 100644 (file)
@@ -69,7 +69,7 @@ static void minix_destroy_inode(struct inode *inode)
        kmem_cache_free(minix_inode_cachep, minix_i(inode));
 }
 
-static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flags)
+static void init_once(struct kmem_cache * cachep, void *foo)
 {
        struct minix_inode_info *ei = (struct minix_inode_info *) foo;
 
index 7f8536dbdedcfeb794d716539aa33cefc9b93e8d..e1cb70c643f8f81f599ad1da0c76cc9080aba332 100644 (file)
@@ -56,7 +56,7 @@ static void ncp_destroy_inode(struct inode *inode)
        kmem_cache_free(ncp_inode_cachep, NCP_FINFO(inode));
 }
 
-static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flags)
+static void init_once(struct kmem_cache *cachep, void *foo)
 {
        struct ncp_inode_info *ei = (struct ncp_inode_info *) foo;
 
index 035c769b715e8e256693402b260663fd17945514..6c22453d77aea6071622f6d2d104d1b6c258d223 100644 (file)
@@ -1154,7 +1154,7 @@ static inline void nfs4_init_once(struct nfs_inode *nfsi)
 #endif
 }
 
-static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flags)
+static void init_once(struct kmem_cache * cachep, void *foo)
 {
        struct nfs_inode *nfsi = (struct nfs_inode *) foo;
 
index 90c4e3a29706c1210ccce4d9d94dc37e3df0659d..ad2124573024001848d08966b92866950532b3d9 100644 (file)
@@ -3080,8 +3080,7 @@ struct kmem_cache *ntfs_inode_cache;
 struct kmem_cache *ntfs_big_inode_cache;
 
 /* Init once constructor for the inode slab cache. */
-static void ntfs_big_inode_init_once(void *foo, struct kmem_cache *cachep,
-               unsigned long flags)
+static void ntfs_big_inode_init_once(struct kmem_cache *cachep, void *foo)
 {
        ntfs_inode *ni = (ntfs_inode *)foo;
 
index 1150412758ac48b7bd4af93d3d08d1c291095647..6639baab079856af2d6ff3d336450feb7303db8b 100644 (file)
@@ -255,9 +255,8 @@ static ssize_t dlmfs_file_write(struct file *filp,
        return writelen;
 }
 
-static void dlmfs_init_once(void *foo,
-                           struct kmem_cache *cachep,
-                           unsigned long flags)
+static void dlmfs_init_once(struct kmem_cache *cachep,
+                           void *foo)
 {
        struct dlmfs_inode_private *ip =
                (struct dlmfs_inode_private *) foo;
index 0e2a1b45bf922f909936d1af3212e4e6d469edfd..be562ac3e89c25e690e2701cb500cf5c5c12ae77 100644 (file)
@@ -1000,9 +1000,7 @@ bail:
        return status;
 }
 
-static void ocfs2_inode_init_once(void *data,
-                                 struct kmem_cache *cachep,
-                                 unsigned long flags)
+static void ocfs2_inode_init_once(struct kmem_cache *cachep, void *data)
 {
        struct ocfs2_inode_info *oi = data;
 
index dd86be2aa6c922b0bc4ec0407fa4effd8c50be2c..d88173840082aad76ab84a2c086c3d06bb73bef9 100644 (file)
@@ -415,7 +415,7 @@ static struct file_system_type openprom_fs_type = {
        .kill_sb        = kill_anon_super,
 };
 
-static void op_inode_init_once(void *data, struct kmem_cache * cachep, unsigned long flags)
+static void op_inode_init_once(struct kmem_cache * cachep, void *data)
 {
        struct op_inode_info *oi = (struct op_inode_info *) data;
 
index 0e4d37c93eea70208a82a5861735817209082fd7..7cffa433a3c8ab35945b431c29c6b7cc1dd10727 100644 (file)
@@ -107,7 +107,7 @@ static void proc_destroy_inode(struct inode *inode)
        kmem_cache_free(proc_inode_cachep, PROC_I(inode));
 }
 
-static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flags)
+static void init_once(struct kmem_cache * cachep, void *foo)
 {
        struct proc_inode *ei = (struct proc_inode *) foo;
 
index df8bd87e49b724f3014f65245aa48922792c58c8..638bdb963213bd70e2b0dab87f71cec1ce3d7f9f 100644 (file)
@@ -536,8 +536,7 @@ static void qnx4_destroy_inode(struct inode *inode)
        kmem_cache_free(qnx4_inode_cachep, qnx4_i(inode));
 }
 
-static void init_once(void *foo, struct kmem_cache * cachep,
-                     unsigned long flags)
+static void init_once(struct kmem_cache *cachep, void *foo)
 {
        struct qnx4_inode_info *ei = (struct qnx4_inode_info *) foo;
 
index a005451930b7e1b01d8dfb4a8db8f756a4c37bf2..edfd74f9f7e4db8d84c63135b331591f7be5d661 100644 (file)
@@ -508,7 +508,7 @@ static void reiserfs_destroy_inode(struct inode *inode)
        kmem_cache_free(reiserfs_inode_cachep, REISERFS_I(inode));
 }
 
-static void init_once(void *foo, struct kmem_cache * cachep, unsigned long flags)
+static void init_once(struct kmem_cache * cachep, void *foo)
 {
        struct reiserfs_inode_info *ei = (struct reiserfs_inode_info *)foo;
 
index dae7945f90e4e9aee698a4d06008eb41d7dd2e2a..7c5e5f573b056133b58df7c581fcb7e1acd260db 100644 (file)
@@ -566,7 +566,7 @@ static void romfs_destroy_inode(struct inode *inode)
        kmem_cache_free(romfs_inode_cachep, ROMFS_I(inode));
 }
 
-static void init_once(void *foo, struct kmem_cache *cachep, unsigned long flags)
+static void init_once(struct kmem_cache *cachep, void *foo)
 {
        struct romfs_inode_info *ei = foo;
 
index 73d1450a95d4233357650af9b99359cf56dab217..ab517755ece0aed5a07d46fcd16ad447e68f8d85 100644 (file)
@@ -67,7 +67,7 @@ static void smb_destroy_inode(struct inode *inode)
        kmem_cache_free(smb_inode_cachep, SMB_I(inode));
 }
 
-static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flags)
+static void init_once(struct kmem_cache *cachep, void *foo)
 {
        struct smb_inode_info *ei = (struct smb_inode_info *) foo;
 
index 7c4e5d302abb937d3cdbe4903ff52bf941a5a6d3..81ec6c548c07c0e34db7821cf72e8f0676f3d177 100644 (file)
@@ -318,7 +318,7 @@ static void sysv_destroy_inode(struct inode *inode)
        kmem_cache_free(sysv_inode_cachep, SYSV_I(inode));
 }
 
-static void init_once(void *p, struct kmem_cache *cachep, unsigned long flags)
+static void init_once(struct kmem_cache *cachep, void *p)
 {
        struct sysv_inode_info *si = (struct sysv_inode_info *)p;
 
index c68a6e730b97918f041819f055492193b10869ab..f175c9bf3b9c9af405001cc87219a1e47439aaaa 100644 (file)
@@ -134,7 +134,7 @@ static void udf_destroy_inode(struct inode *inode)
        kmem_cache_free(udf_inode_cachep, UDF_I(inode));
 }
 
-static void init_once(void *foo, struct kmem_cache *cachep, unsigned long flags)
+static void init_once(struct kmem_cache *cachep, void *foo)
 {
        struct udf_inode_info *ei = (struct udf_inode_info *)foo;
 
index 38eb0b7a1f3d3111c0e4a1b604d7ac40e110cc46..c5bdea7c23a9754002ff128dc2ad716ad3ce4357 100644 (file)
@@ -1232,7 +1232,7 @@ static void ufs_destroy_inode(struct inode *inode)
        kmem_cache_free(ufs_inode_cachep, UFS_I(inode));
 }
 
-static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flags)
+static void init_once(struct kmem_cache * cachep, void *foo)
 {
        struct ufs_inode_info *ei = (struct ufs_inode_info *) foo;
 
index e6ea293f303c99cfa625ae08747f3c7e486c2ea4..5e9564902976e0f1d76fbfbb0cb4565afcf36def 100644 (file)
@@ -79,7 +79,7 @@ kmem_zone_init(int size, char *zone_name)
 
 static inline kmem_zone_t *
 kmem_zone_init_flags(int size, char *zone_name, unsigned long flags,
-                    void (*construct)(void *, kmem_zone_t *, unsigned long))
+                    void (*construct)(kmem_zone_t *, void *))
 {
        return kmem_cache_create(zone_name, size, 0, flags, construct);
 }
index 491d1f4f202d8d5919ade355c0a212825e8c8a54..9c7d8202088fb5cdda4da6ef2c9f2ad0b2ed649e 100644 (file)
@@ -356,9 +356,8 @@ xfs_fs_destroy_inode(
 
 STATIC void
 xfs_fs_inode_init_once(
-       void                    *vnode,
        kmem_zone_t             *zonep,
-       unsigned long           flags)
+       void                    *vnode)
 {
        inode_init_once(vn_to_inode((bhv_vnode_t *)vnode));
 }
index c7fefa6b12fd41bc5856908f9c869dfd3d8eecc1..acd4b339c49b411b273949c0c70b799696844bd8 100644 (file)
@@ -40,7 +40,7 @@ extern spinlock_t pgd_lock;
 extern struct page *pgd_list;
 void check_pgt_cache(void);
 
-void pmd_ctor(void *, struct kmem_cache *, unsigned long);
+void pmd_ctor(struct kmem_cache *, void *);
 void pgtable_cache_init(void);
 void paging_init(void);
 
index 3a5bad3ad126c2a901cac50e7a69579c3f4e40a5..f3a8eecd99f3c4b5eb68d10389e3b96546699f4d 100644 (file)
@@ -53,7 +53,7 @@ int slab_is_available(void);
 
 struct kmem_cache *kmem_cache_create(const char *, size_t, size_t,
                        unsigned long,
-                       void (*)(void *, struct kmem_cache *, unsigned long));
+                       void (*)(struct kmem_cache *, void *));
 void kmem_cache_destroy(struct kmem_cache *);
 int kmem_cache_shrink(struct kmem_cache *);
 void kmem_cache_free(struct kmem_cache *, void *);
index d65159d1d4f5cd6437ee7abda73a10584c7e1adb..40801e754afb48430e3af7c59497b5726e298250 100644 (file)
@@ -49,7 +49,7 @@ struct kmem_cache {
        /* Allocation and freeing of slabs */
        int objects;            /* Number of objects in slab */
        int refcount;           /* Refcount for slab cache destroy */
-       void (*ctor)(void *, struct kmem_cache *, unsigned long);
+       void (*ctor)(struct kmem_cache *, void *);
        int inuse;              /* Offset to metadata */
        int align;              /* Alignment */
        const char *name;       /* Name (only for display!) */
index 24df3347ad4b4ca47d60a8f6c33f4e4d9dea1c40..774843cff756fe169948b8a084649d5f36dcb7fa 100644 (file)
@@ -211,7 +211,7 @@ static int mqueue_get_sb(struct file_system_type *fs_type,
        return get_sb_single(fs_type, flags, data, mqueue_fill_super, mnt);
 }
 
-static void init_once(void *foo, struct kmem_cache * cachep, unsigned long flags)
+static void init_once(struct kmem_cache *cachep, void *foo)
 {
        struct mqueue_inode_info *p = (struct mqueue_inode_info *) foo;
 
index 163325af8179adc71c9fbce52a4ffcb6fe9bac56..8a97e92c604f4ed55bea192ade61bd057beaec0d 100644 (file)
@@ -1445,8 +1445,7 @@ long do_fork(unsigned long clone_flags,
 #define ARCH_MIN_MMSTRUCT_ALIGN 0
 #endif
 
-static void sighand_ctor(void *data, struct kmem_cache *cachep,
-                       unsigned long flags)
+static void sighand_ctor(struct kmem_cache *cachep, void *data)
 {
        struct sighand_struct *sighand = data;
 
index 09cbe2b69edb22ddc18c2feea74ff35b315e5018..afbb0b1023d46cd5a3619175730c7ced7bc1e419 100644 (file)
--- a/lib/idr.c
+++ b/lib/idr.c
@@ -580,8 +580,7 @@ void *idr_replace(struct idr *idp, void *ptr, int id)
 }
 EXPORT_SYMBOL(idr_replace);
 
-static void idr_cache_ctor(void * idr_layer, struct kmem_cache *idr_layer_cache,
-               unsigned long flags)
+static void idr_cache_ctor(struct kmem_cache *idr_layer_cache, void *idr_layer)
 {
        memset(idr_layer, 0, sizeof(struct idr_layer));
 }
index 6b26f9d3980079a8d889e8d57859ce9a7cbb89bd..53fd44d78716cfb3d0b9f77c1372737e49a1a12b 100644 (file)
@@ -1042,7 +1042,7 @@ int radix_tree_tagged(struct radix_tree_root *root, unsigned int tag)
 EXPORT_SYMBOL(radix_tree_tagged);
 
 static void
-radix_tree_node_ctor(void *node, struct kmem_cache *cachep, unsigned long flags)
+radix_tree_node_ctor(struct kmem_cache *cachep, void *node)
 {
        memset(node, 0, sizeof(struct radix_tree_node));
 }
index 2b9f413c9c00da3ebee3220e1d8f0d64d5b10626..f6e85d7a7e459c0173d401336c0b14bd43c411c4 100644 (file)
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -137,8 +137,7 @@ void anon_vma_unlink(struct vm_area_struct *vma)
                anon_vma_free(anon_vma);
 }
 
-static void anon_vma_ctor(void *data, struct kmem_cache *cachep,
-                         unsigned long flags)
+static void anon_vma_ctor(struct kmem_cache *cachep, void *data)
 {
        struct anon_vma *anon_vma = data;
 
index 2f039f32031ff2cb05b8a0b98a97cc8f553689ec..204865750fe4610362454c27f27753022b0d7425 100644 (file)
@@ -2328,8 +2328,7 @@ static void shmem_destroy_inode(struct inode *inode)
        kmem_cache_free(shmem_inode_cachep, SHMEM_I(inode));
 }
 
-static void init_once(void *foo, struct kmem_cache *cachep,
-                     unsigned long flags)
+static void init_once(struct kmem_cache *cachep, void *foo)
 {
        struct shmem_inode_info *p = (struct shmem_inode_info *) foo;
 
index e34bcb87a6ee19c7fadaa6a0f9ccbb5e956e8b79..18fa1a65f57ba906275ff1bc5062fbc91797f4e1 100644 (file)
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -408,7 +408,7 @@ struct kmem_cache {
        unsigned int dflags;            /* dynamic flags */
 
        /* constructor func */
-       void (*ctor) (void *, struct kmem_cache *, unsigned long);
+       void (*ctor)(struct kmem_cache *, void *);
 
 /* 5) cache creation/removal */
        const char *name;
@@ -2129,7 +2129,7 @@ static int __init_refok setup_cpu_cache(struct kmem_cache *cachep)
 struct kmem_cache *
 kmem_cache_create (const char *name, size_t size, size_t align,
        unsigned long flags,
-       void (*ctor)(void*, struct kmem_cache *, unsigned long))
+       void (*ctor)(struct kmem_cache *, void *))
 {
        size_t left_over, slab_size, ralign;
        struct kmem_cache *cachep = NULL, *pc;
@@ -2636,8 +2636,7 @@ static void cache_init_objs(struct kmem_cache *cachep,
                 * They must also be threaded.
                 */
                if (cachep->ctor && !(cachep->flags & SLAB_POISON))
-                       cachep->ctor(objp + obj_offset(cachep), cachep,
-                                    0);
+                       cachep->ctor(cachep, objp + obj_offset(cachep));
 
                if (cachep->flags & SLAB_RED_ZONE) {
                        if (*dbg_redzone2(cachep, objp) != RED_INACTIVE)
@@ -2653,7 +2652,7 @@ static void cache_init_objs(struct kmem_cache *cachep,
                                         cachep->buffer_size / PAGE_SIZE, 0);
 #else
                if (cachep->ctor)
-                       cachep->ctor(objp, cachep, 0);
+                       cachep->ctor(cachep, objp);
 #endif
                slab_bufctl(slabp)[i] = i + 1;
        }
@@ -3078,7 +3077,7 @@ static void *cache_alloc_debugcheck_after(struct kmem_cache *cachep,
 #endif
        objp += obj_offset(cachep);
        if (cachep->ctor && cachep->flags & SLAB_POISON)
-               cachep->ctor(objp, cachep, 0);
+               cachep->ctor(cachep, objp);
 #if ARCH_SLAB_MINALIGN
        if ((u32)objp & (ARCH_SLAB_MINALIGN-1)) {
                printk(KERN_ERR "0x%p: not aligned to ARCH_SLAB_MINALIGN=%d\n",
index de5d5563a46c624c82290f0c6591428d1a4fd1c2..5bc2ceb692ec94925340e0b65ce4cb8695e2cee1 100644 (file)
--- a/mm/slob.c
+++ b/mm/slob.c
@@ -499,12 +499,12 @@ struct kmem_cache {
        unsigned int size, align;
        unsigned long flags;
        const char *name;
-       void (*ctor)(void *, struct kmem_cache *, unsigned long);
+       void (*ctor)(struct kmem_cache *, void *);
 };
 
 struct kmem_cache *kmem_cache_create(const char *name, size_t size,
        size_t align, unsigned long flags,
-       void (*ctor)(void*, struct kmem_cache *, unsigned long))
+       void (*ctor)(struct kmem_cache *, void *))
 {
        struct kmem_cache *c;
 
@@ -548,7 +548,7 @@ void *kmem_cache_alloc_node(struct kmem_cache *c, gfp_t flags, int node)
                b = slob_new_page(flags, get_order(c->size), node);
 
        if (c->ctor)
-               c->ctor(b, c, 0);
+               c->ctor(c, b);
 
        return b;
 }
index 0f862fbd344bec0330a7889f2ea849509cbf42ae..e29a42988c78ca17d9594c2cb9fdb3cb87c257d0 100644 (file)
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -980,7 +980,7 @@ __setup("slub_debug", setup_slub_debug);
 
 static unsigned long kmem_cache_flags(unsigned long objsize,
        unsigned long flags, const char *name,
-       void (*ctor)(void *, struct kmem_cache *, unsigned long))
+       void (*ctor)(struct kmem_cache *, void *))
 {
        /*
         * The page->offset field is only 16 bit wide. This is an offset
@@ -1027,7 +1027,7 @@ static inline int check_object(struct kmem_cache *s, struct page *page,
 static inline void add_full(struct kmem_cache_node *n, struct page *page) {}
 static inline unsigned long kmem_cache_flags(unsigned long objsize,
        unsigned long flags, const char *name,
-       void (*ctor)(void *, struct kmem_cache *, unsigned long))
+       void (*ctor)(struct kmem_cache *, void *))
 {
        return flags;
 }
@@ -1071,7 +1071,7 @@ static void setup_object(struct kmem_cache *s, struct page *page,
 {
        setup_object_debug(s, page, object);
        if (unlikely(s->ctor))
-               s->ctor(object, s, 0);
+               s->ctor(s, object);
 }
 
 static struct page *new_slab(struct kmem_cache *s, gfp_t flags, int node)
@@ -2211,7 +2211,7 @@ static int calculate_sizes(struct kmem_cache *s)
 static int kmem_cache_open(struct kmem_cache *s, gfp_t gfpflags,
                const char *name, size_t size,
                size_t align, unsigned long flags,
-               void (*ctor)(void *, struct kmem_cache *, unsigned long))
+               void (*ctor)(struct kmem_cache *, void *))
 {
        memset(s, 0, kmem_size);
        s->name = name;
@@ -2801,7 +2801,7 @@ static int slab_unmergeable(struct kmem_cache *s)
 
 static struct kmem_cache *find_mergeable(size_t size,
                size_t align, unsigned long flags, const char *name,
-               void (*ctor)(void *, struct kmem_cache *, unsigned long))
+               void (*ctor)(struct kmem_cache *, void *))
 {
        struct kmem_cache *s;
 
@@ -2842,7 +2842,7 @@ static struct kmem_cache *find_mergeable(size_t size,
 
 struct kmem_cache *kmem_cache_create(const char *name, size_t size,
                size_t align, unsigned long flags,
-               void (*ctor)(void *, struct kmem_cache *, unsigned long))
+               void (*ctor)(struct kmem_cache *, void *))
 {
        struct kmem_cache *s;
 
index 379b3a3907551f50d42776664d0bc66aafcfa671..3cd96fe8191d260d534f97553d6e35737d14bfd0 100644 (file)
@@ -258,7 +258,7 @@ static void sock_destroy_inode(struct inode *inode)
                        container_of(inode, struct socket_alloc, vfs_inode));
 }
 
-static void init_once(void *foo, struct kmem_cache *cachep, unsigned long flags)
+static void init_once(struct kmem_cache *cachep, void *foo)
 {
        struct socket_alloc *ei = (struct socket_alloc *)foo;
 
index c8433e8865aa63e7739fd5c0586fb977af2a207f..18f0a8dcc095d9506699f553c7630aaac363cd54 100644 (file)
@@ -842,7 +842,7 @@ static struct file_system_type rpc_pipe_fs_type = {
 };
 
 static void
-init_once(void * foo, struct kmem_cache * cachep, unsigned long flags)
+init_once(struct kmem_cache * cachep, void *foo)
 {
        struct rpc_inode *rpci = (struct rpc_inode *) foo;