[IRDA]: Fix rfcomm use-after-free
[pandora-kernel.git] / ipc / mqueue.c
index fab5707..145d5a0 100644 (file)
@@ -215,8 +215,7 @@ static void init_once(void *foo, struct kmem_cache * cachep, unsigned long flags
 {
        struct mqueue_inode_info *p = (struct mqueue_inode_info *) foo;
 
-       if (flags & SLAB_CTOR_CONSTRUCTOR)
-               inode_init_once(&p->vfs_inode);
+       inode_init_once(&p->vfs_inode);
 }
 
 static struct inode *mqueue_alloc_inode(struct super_block *sb)
@@ -1254,7 +1253,7 @@ static int __init init_mqueue_fs(void)
 
        mqueue_inode_cachep = kmem_cache_create("mqueue_inode_cache",
                                sizeof(struct mqueue_inode_info), 0,
-                               SLAB_HWCACHE_ALIGN, init_once, NULL);
+                               SLAB_HWCACHE_ALIGN, init_once);
        if (mqueue_inode_cachep == NULL)
                return -ENOMEM;