]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - security/selinux/ss/avtab.c
mm: Remove slab destructors from kmem_cache_create().
[net-next-2.6.git] / security / selinux / ss / avtab.c
index d049c7acbc8bc9b5a03853eeeb0496ac0901ee45..85705eb289e02eda07ef79170547b7d004a48e90 100644 (file)
@@ -28,7 +28,7 @@
  (keyp->source_type << 9)) & \
  AVTAB_HASH_MASK)
 
-static kmem_cache_t *avtab_node_cachep;
+static struct kmem_cache *avtab_node_cachep;
 
 static struct avtab_node*
 avtab_insert_node(struct avtab *h, int hvalue,
@@ -36,10 +36,9 @@ avtab_insert_node(struct avtab *h, int hvalue,
                  struct avtab_key *key, struct avtab_datum *datum)
 {
        struct avtab_node * newnode;
-       newnode = kmem_cache_alloc(avtab_node_cachep, SLAB_KERNEL);
+       newnode = kmem_cache_zalloc(avtab_node_cachep, GFP_KERNEL);
        if (newnode == NULL)
                return NULL;
-       memset(newnode, 0, sizeof(struct avtab_node));
        newnode->key = *key;
        newnode->datum = *datum;
        if (prev) {
@@ -278,7 +277,7 @@ void avtab_hash_eval(struct avtab *h, char *tag)
                }
        }
 
-       printk(KERN_INFO "%s:  %d entries and %d/%d buckets used, longest "
+       printk(KERN_DEBUG "%s:  %d entries and %d/%d buckets used, longest "
               "chain length %d\n", tag, h->nel, slots_used, AVTAB_SIZE,
               max_chain_len);
 }
@@ -446,7 +445,7 @@ void avtab_cache_init(void)
 {
        avtab_node_cachep = kmem_cache_create("avtab_node",
                                              sizeof(struct avtab_node),
-                                             0, SLAB_PANIC, NULL, NULL);
+                                             0, SLAB_PANIC, NULL);
 }
 
 void avtab_cache_destroy(void)