aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/platforms/cell/spufs/inode.c3
-rw-r--r--drivers/mtd/ubi/eba.c3
-rw-r--r--fs/adfs/super.c3
-rw-r--r--fs/affs/super.c3
-rw-r--r--fs/afs/super.c3
-rw-r--r--fs/befs/linuxvfs.c3
-rw-r--r--fs/bfs/inode.c3
-rw-r--r--fs/block_dev.c4
-rw-r--r--fs/buffer.c3
-rw-r--r--fs/cifs/cifsfs.c3
-rw-r--r--fs/coda/inode.c3
-rw-r--r--fs/ecryptfs/main.c3
-rw-r--r--fs/efs/super.c3
-rw-r--r--fs/ext2/super.c3
-rw-r--r--fs/ext3/super.c3
-rw-r--r--fs/ext4/super.c3
-rw-r--r--fs/fat/cache.c3
-rw-r--r--fs/fat/inode.c3
-rw-r--r--fs/fuse/inode.c3
-rw-r--r--fs/gfs2/main.c6
-rw-r--r--fs/hfs/super.c2
-rw-r--r--fs/hfsplus/super.c2
-rw-r--r--fs/hpfs/super.c3
-rw-r--r--fs/hugetlbfs/inode.c3
-rw-r--r--fs/inode.c3
-rw-r--r--fs/isofs/inode.c3
-rw-r--r--fs/jffs2/super.c3
-rw-r--r--fs/jfs/jfs_metapage.c3
-rw-r--r--fs/jfs/super.c3
-rw-r--r--fs/locks.c3
-rw-r--r--fs/minix/inode.c3
-rw-r--r--fs/ncpfs/inode.c3
-rw-r--r--fs/nfs/inode.c3
-rw-r--r--fs/ntfs/super.c3
-rw-r--r--fs/ocfs2/dlm/dlmfs.c3
-rw-r--r--fs/ocfs2/super.c3
-rw-r--r--fs/openpromfs/inode.c3
-rw-r--r--fs/proc/inode.c3
-rw-r--r--fs/qnx4/inode.c3
-rw-r--r--fs/reiserfs/super.c3
-rw-r--r--fs/romfs/inode.c3
-rw-r--r--fs/smbfs/inode.c3
-rw-r--r--fs/sysv/inode.c3
-rw-r--r--fs/udf/super.c4
-rw-r--r--fs/ufs/super.c3
-rw-r--r--fs/xfs/linux-2.6/xfs_super.c3
-rw-r--r--include/linux/slab.h2
-rw-r--r--ipc/mqueue.c3
-rw-r--r--kernel/fork.c3
-rw-r--r--mm/rmap.c3
-rw-r--r--mm/shmem.c3
-rw-r--r--mm/slab.c20
-rw-r--r--mm/slub.c10
-rw-r--r--net/socket.c3
-rw-r--r--net/sunrpc/rpc_pipe.c3
55 files changed, 55 insertions, 136 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c
index 13e4f70ec8c0..a93f328a7317 100644
--- a/arch/powerpc/platforms/cell/spufs/inode.c
+++ b/arch/powerpc/platforms/cell/spufs/inode.c
@@ -71,8 +71,7 @@ spufs_init_once(void *p, struct kmem_cache * cachep, unsigned long flags)
71{ 71{
72 struct spufs_inode_info *ei = p; 72 struct spufs_inode_info *ei = p;
73 73
74 if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == 74 if (flags & SLAB_CTOR_CONSTRUCTOR) {
75 SLAB_CTOR_CONSTRUCTOR) {
76 inode_init_once(&ei->vfs_inode); 75 inode_init_once(&ei->vfs_inode);
77 } 76 }
78} 77}
diff --git a/drivers/mtd/ubi/eba.c b/drivers/mtd/ubi/eba.c
index d847ee1da3d9..3dba5733ed1f 100644
--- a/drivers/mtd/ubi/eba.c
+++ b/drivers/mtd/ubi/eba.c
@@ -940,8 +940,7 @@ static void ltree_entry_ctor(void *obj, struct kmem_cache *cache,
940{ 940{
941 struct ltree_entry *le = obj; 941 struct ltree_entry *le = obj;
942 942
943 if ((flags & (SLAB_CTOR_VERIFY | SLAB_CTOR_CONSTRUCTOR)) != 943 if (flags & SLAB_CTOR_CONSTRUCTOR)
944 SLAB_CTOR_CONSTRUCTOR)
945 return; 944 return;
946 945
947 le->users = 0; 946 le->users = 0;
diff --git a/fs/adfs/super.c b/fs/adfs/super.c
index 2e5f2c8371ee..30c296508497 100644
--- a/fs/adfs/super.c
+++ b/fs/adfs/super.c
@@ -232,8 +232,7 @@ static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flag
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
235 if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == 235 if (flags & SLAB_CTOR_CONSTRUCTOR)
236 SLAB_CTOR_CONSTRUCTOR)
237 inode_init_once(&ei->vfs_inode); 236 inode_init_once(&ei->vfs_inode);
238} 237}
239 238
diff --git a/fs/affs/super.c b/fs/affs/super.c
index c3986a1911b0..beff7d21e6e2 100644
--- a/fs/affs/super.c
+++ b/fs/affs/super.c
@@ -87,8 +87,7 @@ static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flag
87{ 87{
88 struct affs_inode_info *ei = (struct affs_inode_info *) foo; 88 struct affs_inode_info *ei = (struct affs_inode_info *) foo;
89 89
90 if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == 90 if (flags & SLAB_CTOR_CONSTRUCTOR) {
91 SLAB_CTOR_CONSTRUCTOR) {
92 init_MUTEX(&ei->i_link_lock); 91 init_MUTEX(&ei->i_link_lock);
93 init_MUTEX(&ei->i_ext_lock); 92 init_MUTEX(&ei->i_ext_lock);
94 inode_init_once(&ei->vfs_inode); 93 inode_init_once(&ei->vfs_inode);
diff --git a/fs/afs/super.c b/fs/afs/super.c
index 41173f81ac47..7030d76155fc 100644
--- a/fs/afs/super.c
+++ b/fs/afs/super.c
@@ -453,8 +453,7 @@ static void afs_i_init_once(void *_vnode, struct kmem_cache *cachep,
453{ 453{
454 struct afs_vnode *vnode = _vnode; 454 struct afs_vnode *vnode = _vnode;
455 455
456 if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == 456 if (flags & SLAB_CTOR_CONSTRUCTOR) {
457 SLAB_CTOR_CONSTRUCTOR) {
458 memset(vnode, 0, sizeof(*vnode)); 457 memset(vnode, 0, sizeof(*vnode));
459 inode_init_once(&vnode->vfs_inode); 458 inode_init_once(&vnode->vfs_inode);
460 init_waitqueue_head(&vnode->update_waitq); 459 init_waitqueue_head(&vnode->update_waitq);
diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
index cc6cc8ed2e39..fe96108a788d 100644
--- a/fs/befs/linuxvfs.c
+++ b/fs/befs/linuxvfs.c
@@ -293,8 +293,7 @@ static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flag
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
296 if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == 296 if (flags & SLAB_CTOR_CONSTRUCTOR) {
297 SLAB_CTOR_CONSTRUCTOR) {
298 inode_init_once(&bi->vfs_inode); 297 inode_init_once(&bi->vfs_inode);
299 } 298 }
300} 299}
diff --git a/fs/bfs/inode.c b/fs/bfs/inode.c
index 93d6219243ad..edc08d89aabc 100644
--- a/fs/bfs/inode.c
+++ b/fs/bfs/inode.c
@@ -248,8 +248,7 @@ static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flag
248{ 248{
249 struct bfs_inode_info *bi = foo; 249 struct bfs_inode_info *bi = foo;
250 250
251 if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == 251 if (flags & SLAB_CTOR_CONSTRUCTOR)
252 SLAB_CTOR_CONSTRUCTOR)
253 inode_init_once(&bi->vfs_inode); 252 inode_init_once(&bi->vfs_inode);
254} 253}
255 254
diff --git a/fs/block_dev.c b/fs/block_dev.c
index 6fe49b9349ea..f02b7bdd9864 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -457,9 +457,7 @@ static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flag
457 struct bdev_inode *ei = (struct bdev_inode *) foo; 457 struct bdev_inode *ei = (struct bdev_inode *) foo;
458 struct block_device *bdev = &ei->bdev; 458 struct block_device *bdev = &ei->bdev;
459 459
460 if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == 460 if (flags & SLAB_CTOR_CONSTRUCTOR) {
461 SLAB_CTOR_CONSTRUCTOR)
462 {
463 memset(bdev, 0, sizeof(*bdev)); 461 memset(bdev, 0, sizeof(*bdev));
464 mutex_init(&bdev->bd_mutex); 462 mutex_init(&bdev->bd_mutex);
465 sema_init(&bdev->bd_mount_sem, 1); 463 sema_init(&bdev->bd_mount_sem, 1);
diff --git a/fs/buffer.c b/fs/buffer.c
index 80291aad6de6..7db24b9e5449 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -2953,8 +2953,7 @@ EXPORT_SYMBOL(free_buffer_head);
2953static void 2953static void
2954init_buffer_head(void *data, struct kmem_cache *cachep, unsigned long flags) 2954init_buffer_head(void *data, struct kmem_cache *cachep, unsigned long flags)
2955{ 2955{
2956 if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == 2956 if (flags & SLAB_CTOR_CONSTRUCTOR) {
2957 SLAB_CTOR_CONSTRUCTOR) {
2958 struct buffer_head * bh = (struct buffer_head *)data; 2957 struct buffer_head * bh = (struct buffer_head *)data;
2959 2958
2960 memset(bh, 0, sizeof(*bh)); 2959 memset(bh, 0, sizeof(*bh));
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index 5036dae09cd7..8568e100953c 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -701,8 +701,7 @@ cifs_init_once(void *inode, struct kmem_cache * cachep, unsigned long flags)
701{ 701{
702 struct cifsInodeInfo *cifsi = inode; 702 struct cifsInodeInfo *cifsi = inode;
703 703
704 if ((flags & (SLAB_CTOR_VERIFY | SLAB_CTOR_CONSTRUCTOR)) == 704 if (flags & SLAB_CTOR_CONSTRUCTOR) {
705 SLAB_CTOR_CONSTRUCTOR) {
706 inode_init_once(&cifsi->vfs_inode); 705 inode_init_once(&cifsi->vfs_inode);
707 INIT_LIST_HEAD(&cifsi->lockList); 706 INIT_LIST_HEAD(&cifsi->lockList);
708 } 707 }
diff --git a/fs/coda/inode.c b/fs/coda/inode.c
index 614175a3b02e..0aaff3651d14 100644
--- a/fs/coda/inode.c
+++ b/fs/coda/inode.c
@@ -62,8 +62,7 @@ static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flag
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
65 if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == 65 if (flags & SLAB_CTOR_CONSTRUCTOR)
66 SLAB_CTOR_CONSTRUCTOR)
67 inode_init_once(&ei->vfs_inode); 66 inode_init_once(&ei->vfs_inode);
68} 67}
69 68
diff --git a/fs/ecryptfs/main.c b/fs/ecryptfs/main.c
index 6acc8f4fc588..8cbf3f69ebe5 100644
--- a/fs/ecryptfs/main.c
+++ b/fs/ecryptfs/main.c
@@ -583,8 +583,7 @@ inode_info_init_once(void *vptr, struct kmem_cache *cachep, unsigned long flags)
583{ 583{
584 struct ecryptfs_inode_info *ei = (struct ecryptfs_inode_info *)vptr; 584 struct ecryptfs_inode_info *ei = (struct ecryptfs_inode_info *)vptr;
585 585
586 if ((flags & (SLAB_CTOR_VERIFY | SLAB_CTOR_CONSTRUCTOR)) == 586 if (flags & SLAB_CTOR_CONSTRUCTOR)
587 SLAB_CTOR_CONSTRUCTOR)
588 inode_init_once(&ei->vfs_inode); 587 inode_init_once(&ei->vfs_inode);
589} 588}
590 589
diff --git a/fs/efs/super.c b/fs/efs/super.c
index c2235e46edcd..ba7a8b9da0c1 100644
--- a/fs/efs/super.c
+++ b/fs/efs/super.c
@@ -72,8 +72,7 @@ static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flag
72{ 72{
73 struct efs_inode_info *ei = (struct efs_inode_info *) foo; 73 struct efs_inode_info *ei = (struct efs_inode_info *) foo;
74 74
75 if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == 75 if (flags & SLAB_CTOR_CONSTRUCTOR)
76 SLAB_CTOR_CONSTRUCTOR)
77 inode_init_once(&ei->vfs_inode); 76 inode_init_once(&ei->vfs_inode);
78} 77}
79 78
diff --git a/fs/ext2/super.c b/fs/ext2/super.c
index a046a419d8af..685a1c287177 100644
--- a/fs/ext2/super.c
+++ b/fs/ext2/super.c
@@ -160,8 +160,7 @@ static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flag
160{ 160{
161 struct ext2_inode_info *ei = (struct ext2_inode_info *) foo; 161 struct ext2_inode_info *ei = (struct ext2_inode_info *) foo;
162 162
163 if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == 163 if (flags & SLAB_CTOR_CONSTRUCTOR) {
164 SLAB_CTOR_CONSTRUCTOR) {
165 rwlock_init(&ei->i_meta_lock); 164 rwlock_init(&ei->i_meta_lock);
166#ifdef CONFIG_EXT2_FS_XATTR 165#ifdef CONFIG_EXT2_FS_XATTR
167 init_rwsem(&ei->xattr_sem); 166 init_rwsem(&ei->xattr_sem);
diff --git a/fs/ext3/super.c b/fs/ext3/super.c
index 4266b708ca01..54d3c9041259 100644
--- a/fs/ext3/super.c
+++ b/fs/ext3/super.c
@@ -466,8 +466,7 @@ static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flag
466{ 466{
467 struct ext3_inode_info *ei = (struct ext3_inode_info *) foo; 467 struct ext3_inode_info *ei = (struct ext3_inode_info *) foo;
468 468
469 if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == 469 if (flags & SLAB_CTOR_CONSTRUCTOR) {
470 SLAB_CTOR_CONSTRUCTOR) {
471 INIT_LIST_HEAD(&ei->i_orphan); 470 INIT_LIST_HEAD(&ei->i_orphan);
472#ifdef CONFIG_EXT3_FS_XATTR 471#ifdef CONFIG_EXT3_FS_XATTR
473 init_rwsem(&ei->xattr_sem); 472 init_rwsem(&ei->xattr_sem);
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 25e8d0096176..719126932354 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -517,8 +517,7 @@ static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flag
517{ 517{
518 struct ext4_inode_info *ei = (struct ext4_inode_info *) foo; 518 struct ext4_inode_info *ei = (struct ext4_inode_info *) foo;
519 519
520 if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == 520 if (flags & SLAB_CTOR_CONSTRUCTOR) {
521 SLAB_CTOR_CONSTRUCTOR) {
522 INIT_LIST_HEAD(&ei->i_orphan); 521 INIT_LIST_HEAD(&ei->i_orphan);
523#ifdef CONFIG_EXT4DEV_FS_XATTR 522#ifdef CONFIG_EXT4DEV_FS_XATTR
524 init_rwsem(&ei->xattr_sem); 523 init_rwsem(&ei->xattr_sem);
diff --git a/fs/fat/cache.c b/fs/fat/cache.c
index 05c2941c74f2..1959143c1d27 100644
--- a/fs/fat/cache.c
+++ b/fs/fat/cache.c
@@ -40,8 +40,7 @@ static void init_once(void *foo, struct kmem_cache *cachep, unsigned long flags)
40{ 40{
41 struct fat_cache *cache = (struct fat_cache *)foo; 41 struct fat_cache *cache = (struct fat_cache *)foo;
42 42
43 if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == 43 if (flags & SLAB_CTOR_CONSTRUCTOR)
44 SLAB_CTOR_CONSTRUCTOR)
45 INIT_LIST_HEAD(&cache->cache_list); 44 INIT_LIST_HEAD(&cache->cache_list);
46} 45}
47 46
diff --git a/fs/fat/inode.c b/fs/fat/inode.c
index 9bfe607c892e..65cb54bde481 100644
--- a/fs/fat/inode.c
+++ b/fs/fat/inode.c
@@ -499,8 +499,7 @@ static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flag
499{ 499{
500 struct msdos_inode_info *ei = (struct msdos_inode_info *)foo; 500 struct msdos_inode_info *ei = (struct msdos_inode_info *)foo;
501 501
502 if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == 502 if (flags & SLAB_CTOR_CONSTRUCTOR) {
503 SLAB_CTOR_CONSTRUCTOR) {
504 spin_lock_init(&ei->cache_lru_lock); 503 spin_lock_init(&ei->cache_lru_lock);
505 ei->nr_caches = 0; 504 ei->nr_caches = 0;
506 ei->cache_valid_id = FAT_CACHE_VALID + 1; 505 ei->cache_valid_id = FAT_CACHE_VALID + 1;
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
index bdffe0cfe09a..d8003be56e05 100644
--- a/fs/fuse/inode.c
+++ b/fs/fuse/inode.c
@@ -685,8 +685,7 @@ static void fuse_inode_init_once(void *foo, struct kmem_cache *cachep,
685{ 685{
686 struct inode * inode = foo; 686 struct inode * inode = foo;
687 687
688 if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == 688 if (flags & SLAB_CTOR_CONSTRUCTOR)
689 SLAB_CTOR_CONSTRUCTOR)
690 inode_init_once(inode); 689 inode_init_once(inode);
691} 690}
692 691
diff --git a/fs/gfs2/main.c b/fs/gfs2/main.c
index 6e8a59809abf..e2bffae683cc 100644
--- a/fs/gfs2/main.c
+++ b/fs/gfs2/main.c
@@ -27,8 +27,7 @@
27static void gfs2_init_inode_once(void *foo, struct kmem_cache *cachep, unsigned long flags) 27static void gfs2_init_inode_once(void *foo, struct kmem_cache *cachep, unsigned long flags)
28{ 28{
29 struct gfs2_inode *ip = foo; 29 struct gfs2_inode *ip = foo;
30 if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == 30 if (flags & SLAB_CTOR_CONSTRUCTOR) {
31 SLAB_CTOR_CONSTRUCTOR) {
32 inode_init_once(&ip->i_inode); 31 inode_init_once(&ip->i_inode);
33 spin_lock_init(&ip->i_spin); 32 spin_lock_init(&ip->i_spin);
34 init_rwsem(&ip->i_rw_mutex); 33 init_rwsem(&ip->i_rw_mutex);
@@ -39,8 +38,7 @@ static void gfs2_init_inode_once(void *foo, struct kmem_cache *cachep, unsigned
39static void gfs2_init_glock_once(void *foo, struct kmem_cache *cachep, unsigned long flags) 38static void gfs2_init_glock_once(void *foo, struct kmem_cache *cachep, unsigned long flags)
40{ 39{
41 struct gfs2_glock *gl = foo; 40 struct gfs2_glock *gl = foo;
42 if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == 41 if (flags & SLAB_CTOR_CONSTRUCTOR) {
43 SLAB_CTOR_CONSTRUCTOR) {
44 INIT_HLIST_NODE(&gl->gl_list); 42 INIT_HLIST_NODE(&gl->gl_list);
45 spin_lock_init(&gl->gl_spin); 43 spin_lock_init(&gl->gl_spin);
46 INIT_LIST_HEAD(&gl->gl_holders); 44 INIT_LIST_HEAD(&gl->gl_holders);
diff --git a/fs/hfs/super.c b/fs/hfs/super.c
index 623f509f1d47..4f1888f16cf0 100644
--- a/fs/hfs/super.c
+++ b/fs/hfs/super.c
@@ -434,7 +434,7 @@ static void hfs_init_once(void *p, struct kmem_cache *cachep, unsigned long flag
434{ 434{
435 struct hfs_inode_info *i = p; 435 struct hfs_inode_info *i = p;
436 436
437 if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == SLAB_CTOR_CONSTRUCTOR) 437 if (flags & SLAB_CTOR_CONSTRUCTOR)
438 inode_init_once(&i->vfs_inode); 438 inode_init_once(&i->vfs_inode);
439} 439}
440 440
diff --git a/fs/hfsplus/super.c b/fs/hfsplus/super.c
index 1a97f9293447..37afbec8a761 100644
--- a/fs/hfsplus/super.c
+++ b/fs/hfsplus/super.c
@@ -470,7 +470,7 @@ static void hfsplus_init_once(void *p, struct kmem_cache *cachep, unsigned long
470{ 470{
471 struct hfsplus_inode_info *i = p; 471 struct hfsplus_inode_info *i = p;
472 472
473 if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == SLAB_CTOR_CONSTRUCTOR) 473 if (flags & SLAB_CTOR_CONSTRUCTOR)
474 inode_init_once(&i->vfs_inode); 474 inode_init_once(&i->vfs_inode);
475} 475}
476 476
diff --git a/fs/hpfs/super.c b/fs/hpfs/super.c
index e0174e338526..1b95f39fbc37 100644
--- a/fs/hpfs/super.c
+++ b/fs/hpfs/super.c
@@ -176,8 +176,7 @@ static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flag
176{ 176{
177 struct hpfs_inode_info *ei = (struct hpfs_inode_info *) foo; 177 struct hpfs_inode_info *ei = (struct hpfs_inode_info *) foo;
178 178
179 if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == 179 if (flags & SLAB_CTOR_CONSTRUCTOR) {
180 SLAB_CTOR_CONSTRUCTOR) {
181 mutex_init(&ei->i_mutex); 180 mutex_init(&ei->i_mutex);
182 mutex_init(&ei->i_parent_mutex); 181 mutex_init(&ei->i_parent_mutex);
183 inode_init_once(&ei->vfs_inode); 182 inode_init_once(&ei->vfs_inode);
diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
index fe625cd1719a..842a4ed4052d 100644
--- a/fs/hugetlbfs/inode.c
+++ b/fs/hugetlbfs/inode.c
@@ -556,8 +556,7 @@ static void init_once(void *foo, struct kmem_cache *cachep, unsigned long flags)
556{ 556{
557 struct hugetlbfs_inode_info *ei = (struct hugetlbfs_inode_info *)foo; 557 struct hugetlbfs_inode_info *ei = (struct hugetlbfs_inode_info *)foo;
558 558
559 if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == 559 if (flags & SLAB_CTOR_CONSTRUCTOR)
560 SLAB_CTOR_CONSTRUCTOR)
561 inode_init_once(&ei->vfs_inode); 560 inode_init_once(&ei->vfs_inode);
562} 561}
563 562
diff --git a/fs/inode.c b/fs/inode.c
index 5abb097ab1b0..b4296bf62739 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -213,8 +213,7 @@ static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flag
213{ 213{
214 struct inode * inode = (struct inode *) foo; 214 struct inode * inode = (struct inode *) foo;
215 215
216 if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == 216 if (flags & SLAB_CTOR_CONSTRUCTOR)
217 SLAB_CTOR_CONSTRUCTOR)
218 inode_init_once(inode); 217 inode_init_once(inode);
219} 218}
220 219
diff --git a/fs/isofs/inode.c b/fs/isofs/inode.c
index 64a96cdfe3a4..e99f7ff4ecb4 100644
--- a/fs/isofs/inode.c
+++ b/fs/isofs/inode.c
@@ -77,8 +77,7 @@ static void init_once(void *foo, struct kmem_cache * cachep, unsigned long flags
77{ 77{
78 struct iso_inode_info *ei = foo; 78 struct iso_inode_info *ei = foo;
79 79
80 if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == 80 if (flags & SLAB_CTOR_CONSTRUCTOR)
81 SLAB_CTOR_CONSTRUCTOR)
82 inode_init_once(&ei->vfs_inode); 81 inode_init_once(&ei->vfs_inode);
83} 82}
84 83
diff --git a/fs/jffs2/super.c b/fs/jffs2/super.c
index e51164a8a8d4..45368f8bbe72 100644
--- a/fs/jffs2/super.c
+++ b/fs/jffs2/super.c
@@ -47,8 +47,7 @@ static void jffs2_i_init_once(void * foo, struct kmem_cache * cachep, unsigned l
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
50 if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == 50 if (flags & SLAB_CTOR_CONSTRUCTOR) {
51 SLAB_CTOR_CONSTRUCTOR) {
52 init_MUTEX(&ei->sem); 51 init_MUTEX(&ei->sem);
53 inode_init_once(&ei->vfs_inode); 52 inode_init_once(&ei->vfs_inode);
54 } 53 }
diff --git a/fs/jfs/jfs_metapage.c b/fs/jfs/jfs_metapage.c
index 58deae007507..6b3acb0b5781 100644
--- a/fs/jfs/jfs_metapage.c
+++ b/fs/jfs/jfs_metapage.c
@@ -184,8 +184,7 @@ static void init_once(void *foo, struct kmem_cache *cachep, unsigned long flags)
184{ 184{
185 struct metapage *mp = (struct metapage *)foo; 185 struct metapage *mp = (struct metapage *)foo;
186 186
187 if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == 187 if (flags & SLAB_CTOR_CONSTRUCTOR) {
188 SLAB_CTOR_CONSTRUCTOR) {
189 mp->lid = 0; 188 mp->lid = 0;
190 mp->lsn = 0; 189 mp->lsn = 0;
191 mp->flag = 0; 190 mp->flag = 0;
diff --git a/fs/jfs/super.c b/fs/jfs/super.c
index 52d73d54a931..ea9dc3e65dcf 100644
--- a/fs/jfs/super.c
+++ b/fs/jfs/super.c
@@ -752,8 +752,7 @@ static void init_once(void *foo, struct kmem_cache * cachep, unsigned long flags
752{ 752{
753 struct jfs_inode_info *jfs_ip = (struct jfs_inode_info *) foo; 753 struct jfs_inode_info *jfs_ip = (struct jfs_inode_info *) foo;
754 754
755 if ((flags & (SLAB_CTOR_VERIFY | SLAB_CTOR_CONSTRUCTOR)) == 755 if (flags & SLAB_CTOR_CONSTRUCTOR) {
756 SLAB_CTOR_CONSTRUCTOR) {
757 memset(jfs_ip, 0, sizeof(struct jfs_inode_info)); 756 memset(jfs_ip, 0, sizeof(struct jfs_inode_info));
758 INIT_LIST_HEAD(&jfs_ip->anon_inode_list); 757 INIT_LIST_HEAD(&jfs_ip->anon_inode_list);
759 init_rwsem(&jfs_ip->rdwrlock); 758 init_rwsem(&jfs_ip->rdwrlock);
diff --git a/fs/locks.c b/fs/locks.c
index 52a81005dab4..325578074742 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -203,8 +203,7 @@ static void init_once(void *foo, struct kmem_cache *cache, unsigned long flags)
203{ 203{
204 struct file_lock *lock = (struct file_lock *) foo; 204 struct file_lock *lock = (struct file_lock *) foo;
205 205
206 if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) != 206 if (!(flags & SLAB_CTOR_CONSTRUCTOR))
207 SLAB_CTOR_CONSTRUCTOR)
208 return; 207 return;
209 208
210 locks_init_lock(lock); 209 locks_init_lock(lock);
diff --git a/fs/minix/inode.c b/fs/minix/inode.c
index 92e383af3709..2f4d43a2a310 100644
--- a/fs/minix/inode.c
+++ b/fs/minix/inode.c
@@ -73,8 +73,7 @@ static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flag
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
76 if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == 76 if (flags & SLAB_CTOR_CONSTRUCTOR)
77 SLAB_CTOR_CONSTRUCTOR)
78 inode_init_once(&ei->vfs_inode); 77 inode_init_once(&ei->vfs_inode);
79} 78}
80 79
diff --git a/fs/ncpfs/inode.c b/fs/ncpfs/inode.c
index 7285c94956c4..c29f00ad495d 100644
--- a/fs/ncpfs/inode.c
+++ b/fs/ncpfs/inode.c
@@ -60,8 +60,7 @@ static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flag
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
63 if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == 63 if (flags & SLAB_CTOR_CONSTRUCTOR) {
64 SLAB_CTOR_CONSTRUCTOR) {
65 mutex_init(&ei->open_mutex); 64 mutex_init(&ei->open_mutex);
66 inode_init_once(&ei->vfs_inode); 65 inode_init_once(&ei->vfs_inode);
67 } 66 }
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 44aa9b726573..1e9a915d1fea 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -1167,8 +1167,7 @@ static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flag
1167{ 1167{
1168 struct nfs_inode *nfsi = (struct nfs_inode *) foo; 1168 struct nfs_inode *nfsi = (struct nfs_inode *) foo;
1169 1169
1170 if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == 1170 if (flags & SLAB_CTOR_CONSTRUCTOR) {
1171 SLAB_CTOR_CONSTRUCTOR) {
1172 inode_init_once(&nfsi->vfs_inode); 1171 inode_init_once(&nfsi->vfs_inode);
1173 spin_lock_init(&nfsi->req_lock); 1172 spin_lock_init(&nfsi->req_lock);
1174 INIT_LIST_HEAD(&nfsi->dirty); 1173 INIT_LIST_HEAD(&nfsi->dirty);
diff --git a/fs/ntfs/super.c b/fs/ntfs/super.c
index 2ddde534db0a..21d834e5ed73 100644
--- a/fs/ntfs/super.c
+++ b/fs/ntfs/super.c
@@ -3085,8 +3085,7 @@ static void ntfs_big_inode_init_once(void *foo, struct kmem_cache *cachep,
3085{ 3085{
3086 ntfs_inode *ni = (ntfs_inode *)foo; 3086 ntfs_inode *ni = (ntfs_inode *)foo;
3087 3087
3088 if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == 3088 if (flags & SLAB_CTOR_CONSTRUCTOR)
3089 SLAB_CTOR_CONSTRUCTOR)
3090 inode_init_once(VFS_I(ni)); 3089 inode_init_once(VFS_I(ni));
3091} 3090}
3092 3091
diff --git a/fs/ocfs2/dlm/dlmfs.c b/fs/ocfs2/dlm/dlmfs.c
index de952eba29a9..d4e46d067edd 100644
--- a/fs/ocfs2/dlm/dlmfs.c
+++ b/fs/ocfs2/dlm/dlmfs.c
@@ -263,8 +263,7 @@ static void dlmfs_init_once(void *foo,
263 struct dlmfs_inode_private *ip = 263 struct dlmfs_inode_private *ip =
264 (struct dlmfs_inode_private *) foo; 264 (struct dlmfs_inode_private *) foo;
265 265
266 if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == 266 if (flags & SLAB_CTOR_CONSTRUCTOR) {
267 SLAB_CTOR_CONSTRUCTOR) {
268 ip->ip_dlm = NULL; 267 ip->ip_dlm = NULL;
269 ip->ip_parent = NULL; 268 ip->ip_parent = NULL;
270 269
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
index f5493540d94f..7c5e3f5d6634 100644
--- a/fs/ocfs2/super.c
+++ b/fs/ocfs2/super.c
@@ -937,8 +937,7 @@ static void ocfs2_inode_init_once(void *data,
937{ 937{
938 struct ocfs2_inode_info *oi = data; 938 struct ocfs2_inode_info *oi = data;
939 939
940 if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == 940 if (flags & SLAB_CTOR_CONSTRUCTOR) {
941 SLAB_CTOR_CONSTRUCTOR) {
942 oi->ip_flags = 0; 941 oi->ip_flags = 0;
943 oi->ip_open_count = 0; 942 oi->ip_open_count = 0;
944 spin_lock_init(&oi->ip_lock); 943 spin_lock_init(&oi->ip_lock);
diff --git a/fs/openpromfs/inode.c b/fs/openpromfs/inode.c
index bde1c164417d..731a90e9f0cd 100644
--- a/fs/openpromfs/inode.c
+++ b/fs/openpromfs/inode.c
@@ -419,8 +419,7 @@ static void op_inode_init_once(void *data, struct kmem_cache * cachep, unsigned
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
422 if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == 422 if (flags & SLAB_CTOR_CONSTRUCTOR)
423 SLAB_CTOR_CONSTRUCTOR)
424 inode_init_once(&oi->vfs_inode); 423 inode_init_once(&oi->vfs_inode);
425} 424}
426 425
diff --git a/fs/proc/inode.c b/fs/proc/inode.c
index c372eb151a3a..22b1158389ae 100644
--- a/fs/proc/inode.c
+++ b/fs/proc/inode.c
@@ -109,8 +109,7 @@ static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flag
109{ 109{
110 struct proc_inode *ei = (struct proc_inode *) foo; 110 struct proc_inode *ei = (struct proc_inode *) foo;
111 111
112 if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == 112 if (flags & SLAB_CTOR_CONSTRUCTOR)
113 SLAB_CTOR_CONSTRUCTOR)
114 inode_init_once(&ei->vfs_inode); 113 inode_init_once(&ei->vfs_inode);
115} 114}
116 115
diff --git a/fs/qnx4/inode.c b/fs/qnx4/inode.c
index 83bc8e7824cd..75fc8498f2e2 100644
--- a/fs/qnx4/inode.c
+++ b/fs/qnx4/inode.c
@@ -536,8 +536,7 @@ static void init_once(void *foo, struct kmem_cache * cachep,
536{ 536{
537 struct qnx4_inode_info *ei = (struct qnx4_inode_info *) foo; 537 struct qnx4_inode_info *ei = (struct qnx4_inode_info *) foo;
538 538
539 if ((flags & (SLAB_CTOR_VERIFY | SLAB_CTOR_CONSTRUCTOR)) == 539 if (flags & SLAB_CTOR_CONSTRUCTOR)
540 SLAB_CTOR_CONSTRUCTOR)
541 inode_init_once(&ei->vfs_inode); 540 inode_init_once(&ei->vfs_inode);
542} 541}
543 542
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
index f13a7f164dc6..7054aaef0493 100644
--- a/fs/reiserfs/super.c
+++ b/fs/reiserfs/super.c
@@ -511,8 +511,7 @@ static void init_once(void *foo, struct kmem_cache * cachep, unsigned long flags
511{ 511{
512 struct reiserfs_inode_info *ei = (struct reiserfs_inode_info *)foo; 512 struct reiserfs_inode_info *ei = (struct reiserfs_inode_info *)foo;
513 513
514 if ((flags & (SLAB_CTOR_VERIFY | SLAB_CTOR_CONSTRUCTOR)) == 514 if (flags & SLAB_CTOR_CONSTRUCTOR) {
515 SLAB_CTOR_CONSTRUCTOR) {
516 INIT_LIST_HEAD(&ei->i_prealloc_list); 515 INIT_LIST_HEAD(&ei->i_prealloc_list);
517 inode_init_once(&ei->vfs_inode); 516 inode_init_once(&ei->vfs_inode);
518#ifdef CONFIG_REISERFS_FS_POSIX_ACL 517#ifdef CONFIG_REISERFS_FS_POSIX_ACL
diff --git a/fs/romfs/inode.c b/fs/romfs/inode.c
index fd601014813e..804285190271 100644
--- a/fs/romfs/inode.c
+++ b/fs/romfs/inode.c
@@ -570,8 +570,7 @@ static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flag
570{ 570{
571 struct romfs_inode_info *ei = (struct romfs_inode_info *) foo; 571 struct romfs_inode_info *ei = (struct romfs_inode_info *) foo;
572 572
573 if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == 573 if (flags & SLAB_CTOR_CONSTRUCTOR)
574 SLAB_CTOR_CONSTRUCTOR)
575 inode_init_once(&ei->vfs_inode); 574 inode_init_once(&ei->vfs_inode);
576} 575}
577 576
diff --git a/fs/smbfs/inode.c b/fs/smbfs/inode.c
index 5faba4f1c9ab..424a3ddf86dd 100644
--- a/fs/smbfs/inode.c
+++ b/fs/smbfs/inode.c
@@ -69,9 +69,8 @@ static void smb_destroy_inode(struct inode *inode)
69static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flags) 69static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flags)
70{ 70{
71 struct smb_inode_info *ei = (struct smb_inode_info *) foo; 71 struct smb_inode_info *ei = (struct smb_inode_info *) foo;
72 unsigned long flagmask = SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR;
73 72
74 if ((flags & flagmask) == SLAB_CTOR_CONSTRUCTOR) 73 if (flags & SLAB_CTOR_CONSTRUCTOR)
75 inode_init_once(&ei->vfs_inode); 74 inode_init_once(&ei->vfs_inode);
76} 75}
77 76
diff --git a/fs/sysv/inode.c b/fs/sysv/inode.c
index 9311cac186fe..3152d7415606 100644
--- a/fs/sysv/inode.c
+++ b/fs/sysv/inode.c
@@ -322,8 +322,7 @@ static void init_once(void *p, struct kmem_cache *cachep, unsigned long flags)
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
325 if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == 325 if (flags & SLAB_CTOR_CONSTRUCTOR)
326 SLAB_CTOR_CONSTRUCTOR)
327 inode_init_once(&si->vfs_inode); 326 inode_init_once(&si->vfs_inode);
328} 327}
329 328
diff --git a/fs/udf/super.c b/fs/udf/super.c
index 8672b88f7ff2..023b304fdd99 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -134,9 +134,7 @@ static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flag
134{ 134{
135 struct udf_inode_info *ei = (struct udf_inode_info *) foo; 135 struct udf_inode_info *ei = (struct udf_inode_info *) foo;
136 136
137 if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == 137 if (flags & SLAB_CTOR_CONSTRUCTOR) {
138 SLAB_CTOR_CONSTRUCTOR)
139 {
140 ei->i_ext.i_data = NULL; 138 ei->i_ext.i_data = NULL;
141 inode_init_once(&ei->vfs_inode); 139 inode_init_once(&ei->vfs_inode);
142 } 140 }
diff --git a/fs/ufs/super.c b/fs/ufs/super.c
index b5a6461ec66b..be7c48c5f203 100644
--- a/fs/ufs/super.c
+++ b/fs/ufs/super.c
@@ -1237,8 +1237,7 @@ static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flag
1237{ 1237{
1238 struct ufs_inode_info *ei = (struct ufs_inode_info *) foo; 1238 struct ufs_inode_info *ei = (struct ufs_inode_info *) foo;
1239 1239
1240 if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == 1240 if (flags & SLAB_CTOR_CONSTRUCTOR)
1241 SLAB_CTOR_CONSTRUCTOR)
1242 inode_init_once(&ei->vfs_inode); 1241 inode_init_once(&ei->vfs_inode);
1243} 1242}
1244 1243
diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c
index 2f2c40db562e..14e2cbe5a8d5 100644
--- a/fs/xfs/linux-2.6/xfs_super.c
+++ b/fs/xfs/linux-2.6/xfs_super.c
@@ -360,8 +360,7 @@ xfs_fs_inode_init_once(
360 kmem_zone_t *zonep, 360 kmem_zone_t *zonep,
361 unsigned long flags) 361 unsigned long flags)
362{ 362{
363 if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == 363 if (flags & SLAB_CTOR_CONSTRUCTOR)
364 SLAB_CTOR_CONSTRUCTOR)
365 inode_init_once(vn_to_inode((bhv_vnode_t *)vnode)); 364 inode_init_once(vn_to_inode((bhv_vnode_t *)vnode));
366} 365}
367 366
diff --git a/include/linux/slab.h b/include/linux/slab.h
index e14b4c338b89..1ffe0a959cd4 100644
--- a/include/linux/slab.h
+++ b/include/linux/slab.h
@@ -21,7 +21,6 @@ typedef struct kmem_cache kmem_cache_t __deprecated;
21 * The ones marked DEBUG are only valid if CONFIG_SLAB_DEBUG is set. 21 * The ones marked DEBUG are only valid if CONFIG_SLAB_DEBUG is set.
22 */ 22 */
23#define SLAB_DEBUG_FREE 0x00000100UL /* DEBUG: Perform (expensive) checks on free */ 23#define SLAB_DEBUG_FREE 0x00000100UL /* DEBUG: Perform (expensive) checks on free */
24#define SLAB_DEBUG_INITIAL 0x00000200UL /* DEBUG: Call constructor (as verifier) */
25#define SLAB_RED_ZONE 0x00000400UL /* DEBUG: Red zone objs in a cache */ 24#define SLAB_RED_ZONE 0x00000400UL /* DEBUG: Red zone objs in a cache */
26#define SLAB_POISON 0x00000800UL /* DEBUG: Poison objects */ 25#define SLAB_POISON 0x00000800UL /* DEBUG: Poison objects */
27#define SLAB_HWCACHE_ALIGN 0x00002000UL /* Align objs on cache lines */ 26#define SLAB_HWCACHE_ALIGN 0x00002000UL /* Align objs on cache lines */
@@ -36,7 +35,6 @@ typedef struct kmem_cache kmem_cache_t __deprecated;
36/* Flags passed to a constructor functions */ 35/* Flags passed to a constructor functions */
37#define SLAB_CTOR_CONSTRUCTOR 0x001UL /* If not set, then deconstructor */ 36#define SLAB_CTOR_CONSTRUCTOR 0x001UL /* If not set, then deconstructor */
38#define SLAB_CTOR_ATOMIC 0x002UL /* Tell constructor it can't sleep */ 37#define SLAB_CTOR_ATOMIC 0x002UL /* Tell constructor it can't sleep */
39#define SLAB_CTOR_VERIFY 0x004UL /* Tell constructor it's a verify call */
40 38
41/* 39/*
42 * struct kmem_cache related prototypes 40 * struct kmem_cache related prototypes
diff --git a/ipc/mqueue.c b/ipc/mqueue.c
index 554ac368be79..d17821d3f483 100644
--- a/ipc/mqueue.c
+++ b/ipc/mqueue.c
@@ -215,8 +215,7 @@ static void init_once(void *foo, struct kmem_cache * cachep, unsigned long flags
215{ 215{
216 struct mqueue_inode_info *p = (struct mqueue_inode_info *) foo; 216 struct mqueue_inode_info *p = (struct mqueue_inode_info *) foo;
217 217
218 if ((flags & (SLAB_CTOR_VERIFY | SLAB_CTOR_CONSTRUCTOR)) == 218 if (flags & SLAB_CTOR_CONSTRUCTOR)
219 SLAB_CTOR_CONSTRUCTOR)
220 inode_init_once(&p->vfs_inode); 219 inode_init_once(&p->vfs_inode);
221} 220}
222 221
diff --git a/kernel/fork.c b/kernel/fork.c
index ffccefb28b6a..b7d169def942 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1425,8 +1425,7 @@ static void sighand_ctor(void *data, struct kmem_cache *cachep, unsigned long fl
1425{ 1425{
1426 struct sighand_struct *sighand = data; 1426 struct sighand_struct *sighand = data;
1427 1427
1428 if ((flags & (SLAB_CTOR_VERIFY | SLAB_CTOR_CONSTRUCTOR)) == 1428 if (flags & SLAB_CTOR_CONSTRUCTOR)
1429 SLAB_CTOR_CONSTRUCTOR)
1430 spin_lock_init(&sighand->siglock); 1429 spin_lock_init(&sighand->siglock);
1431} 1430}
1432 1431
diff --git a/mm/rmap.c b/mm/rmap.c
index 59da5b734c80..75a32be64a21 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -162,8 +162,7 @@ void anon_vma_unlink(struct vm_area_struct *vma)
162static void anon_vma_ctor(void *data, struct kmem_cache *cachep, 162static void anon_vma_ctor(void *data, struct kmem_cache *cachep,
163 unsigned long flags) 163 unsigned long flags)
164{ 164{
165 if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == 165 if (flags & SLAB_CTOR_CONSTRUCTOR) {
166 SLAB_CTOR_CONSTRUCTOR) {
167 struct anon_vma *anon_vma = data; 166 struct anon_vma *anon_vma = data;
168 167
169 spin_lock_init(&anon_vma->lock); 168 spin_lock_init(&anon_vma->lock);
diff --git a/mm/shmem.c b/mm/shmem.c
index b2a35ebf071a..f01e8deed645 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -2358,8 +2358,7 @@ static void init_once(void *foo, struct kmem_cache *cachep,
2358{ 2358{
2359 struct shmem_inode_info *p = (struct shmem_inode_info *) foo; 2359 struct shmem_inode_info *p = (struct shmem_inode_info *) foo;
2360 2360
2361 if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == 2361 if (flags & SLAB_CTOR_CONSTRUCTOR) {
2362 SLAB_CTOR_CONSTRUCTOR) {
2363 inode_init_once(&p->vfs_inode); 2362 inode_init_once(&p->vfs_inode);
2364#ifdef CONFIG_TMPFS_POSIX_ACL 2363#ifdef CONFIG_TMPFS_POSIX_ACL
2365 p->i_acl = NULL; 2364 p->i_acl = NULL;
diff --git a/mm/slab.c b/mm/slab.c
index 2a3cbd6e675d..a877d6f3d687 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -116,8 +116,7 @@
116#include <asm/page.h> 116#include <asm/page.h>
117 117
118/* 118/*
119 * DEBUG - 1 for kmem_cache_create() to honour; SLAB_DEBUG_INITIAL, 119 * DEBUG - 1 for kmem_cache_create() to honour; SLAB_RED_ZONE & SLAB_POISON.
120 * SLAB_RED_ZONE & SLAB_POISON.
121 * 0 for faster, smaller code (especially in the critical paths). 120 * 0 for faster, smaller code (especially in the critical paths).
122 * 121 *
123 * STATS - 1 to collect stats for /proc/slabinfo. 122 * STATS - 1 to collect stats for /proc/slabinfo.
@@ -172,7 +171,7 @@
172 171
173/* Legal flag mask for kmem_cache_create(). */ 172/* Legal flag mask for kmem_cache_create(). */
174#if DEBUG 173#if DEBUG
175# define CREATE_MASK (SLAB_DEBUG_INITIAL | SLAB_RED_ZONE | \ 174# define CREATE_MASK (SLAB_RED_ZONE | \
176 SLAB_POISON | SLAB_HWCACHE_ALIGN | \ 175 SLAB_POISON | SLAB_HWCACHE_ALIGN | \
177 SLAB_CACHE_DMA | \ 176 SLAB_CACHE_DMA | \
178 SLAB_STORE_USER | \ 177 SLAB_STORE_USER | \
@@ -2184,12 +2183,6 @@ kmem_cache_create (const char *name, size_t size, size_t align,
2184 2183
2185#if DEBUG 2184#if DEBUG
2186 WARN_ON(strchr(name, ' ')); /* It confuses parsers */ 2185 WARN_ON(strchr(name, ' ')); /* It confuses parsers */
2187 if ((flags & SLAB_DEBUG_INITIAL) && !ctor) {
2188 /* No constructor, but inital state check requested */
2189 printk(KERN_ERR "%s: No con, but init state check "
2190 "requested - %s\n", __FUNCTION__, name);
2191 flags &= ~SLAB_DEBUG_INITIAL;
2192 }
2193#if FORCED_DEBUG 2186#if FORCED_DEBUG
2194 /* 2187 /*
2195 * Enable redzoning and last user accounting, except for caches with 2188 * Enable redzoning and last user accounting, except for caches with
@@ -2895,15 +2888,6 @@ static void *cache_free_debugcheck(struct kmem_cache *cachep, void *objp,
2895 BUG_ON(objnr >= cachep->num); 2888 BUG_ON(objnr >= cachep->num);
2896 BUG_ON(objp != index_to_obj(cachep, slabp, objnr)); 2889 BUG_ON(objp != index_to_obj(cachep, slabp, objnr));
2897 2890
2898 if (cachep->flags & SLAB_DEBUG_INITIAL) {
2899 /*
2900 * Need to call the slab's constructor so the caller can
2901 * perform a verify of its state (debugging). Called without
2902 * the cache-lock held.
2903 */
2904 cachep->ctor(objp + obj_offset(cachep),
2905 cachep, SLAB_CTOR_CONSTRUCTOR | SLAB_CTOR_VERIFY);
2906 }
2907 if (cachep->flags & SLAB_POISON && cachep->dtor) { 2891 if (cachep->flags & SLAB_POISON && cachep->dtor) {
2908 /* we want to cache poison the object, 2892 /* we want to cache poison the object,
2909 * call the destruction callback 2893 * call the destruction callback
diff --git a/mm/slub.c b/mm/slub.c
index 79940e98e5e6..bd86182e595e 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -97,9 +97,6 @@
97 * 97 *
98 * - Support PAGE_ALLOC_DEBUG. Should be easy to do. 98 * - Support PAGE_ALLOC_DEBUG. Should be easy to do.
99 * 99 *
100 * - SLAB_DEBUG_INITIAL is not supported but I have never seen a use of
101 * it.
102 *
103 * - Variable sizing of the per node arrays 100 * - Variable sizing of the per node arrays
104 */ 101 */
105 102
@@ -126,11 +123,6 @@
126#endif 123#endif
127 124
128/* 125/*
129 * Flags from the regular SLAB that SLUB does not support:
130 */
131#define SLUB_UNIMPLEMENTED (SLAB_DEBUG_INITIAL)
132
133/*
134 * Mininum number of partial slabs. These will be left on the partial 126 * Mininum number of partial slabs. These will be left on the partial
135 * lists even if they are empty. kmem_cache_shrink may reclaim them. 127 * lists even if they are empty. kmem_cache_shrink may reclaim them.
136 */ 128 */
@@ -1748,8 +1740,6 @@ static int kmem_cache_open(struct kmem_cache *s, gfp_t gfpflags,
1748 s->flags = flags; 1740 s->flags = flags;
1749 s->align = align; 1741 s->align = align;
1750 1742
1751 BUG_ON(flags & SLUB_UNIMPLEMENTED);
1752
1753 /* 1743 /*
1754 * The page->offset field is only 16 bit wide. This is an offset 1744 * The page->offset field is only 16 bit wide. This is an offset
1755 * in units of words from the beginning of an object. If the slab 1745 * in units of words from the beginning of an object. If the slab
diff --git a/net/socket.c b/net/socket.c
index 1ad62c08377b..759825b7ca26 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -261,8 +261,7 @@ static void init_once(void *foo, struct kmem_cache *cachep, unsigned long flags)
261{ 261{
262 struct socket_alloc *ei = (struct socket_alloc *)foo; 262 struct socket_alloc *ei = (struct socket_alloc *)foo;
263 263
264 if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) 264 if (flags & SLAB_CTOR_CONSTRUCTOR)
265 == SLAB_CTOR_CONSTRUCTOR)
266 inode_init_once(&ei->vfs_inode); 265 inode_init_once(&ei->vfs_inode);
267} 266}
268 267
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c
index 9b9ea5045569..ad39b47e05bc 100644
--- a/net/sunrpc/rpc_pipe.c
+++ b/net/sunrpc/rpc_pipe.c
@@ -828,8 +828,7 @@ init_once(void * foo, struct kmem_cache * cachep, unsigned long flags)
828{ 828{
829 struct rpc_inode *rpci = (struct rpc_inode *) foo; 829 struct rpc_inode *rpci = (struct rpc_inode *) foo;
830 830
831 if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == 831 if (flags & SLAB_CTOR_CONSTRUCTOR) {
832 SLAB_CTOR_CONSTRUCTOR) {
833 inode_init_once(&rpci->vfs_inode); 832 inode_init_once(&rpci->vfs_inode);
834 rpci->private = NULL; 833 rpci->private = NULL;
835 rpci->nreaders = 0; 834 rpci->nreaders = 0;