[PATCH] slab: remove kmem_cache_t
[linux-2.6-block.git] / kernel / taskstats.c
index f45c5e70773c0b2fd6437b3a69ecfbefc1e40bf6..f5f92014ae982de96dcabd0ced40436833ad1fed 100644 (file)
@@ -34,7 +34,7 @@
 
 static DEFINE_PER_CPU(__u32, taskstats_seqnum) = { 0 };
 static int family_registered;
-kmem_cache_t *taskstats_cache;
+struct kmem_cache *taskstats_cache;
 
 static struct genl_family family = {
        .id             = GENL_ID_GENERATE,
@@ -77,8 +77,7 @@ static int prepare_reply(struct genl_info *info, u8 cmd, struct sk_buff **skbp,
        /*
         * If new attributes are added, please revisit this allocation
         */
-       size = nlmsg_total_size(genlmsg_total_size(size));
-       skb = nlmsg_new(size, GFP_KERNEL);
+       skb = genlmsg_new(size, GFP_KERNEL);
        if (!skb)
                return -ENOMEM;
 
@@ -86,13 +85,9 @@ static int prepare_reply(struct genl_info *info, u8 cmd, struct sk_buff **skbp,
                int seq = get_cpu_var(taskstats_seqnum)++;
                put_cpu_var(taskstats_seqnum);
 
-               reply = genlmsg_put(skb, 0, seq,
-                               family.id, 0, 0,
-                               cmd, family.version);
+               reply = genlmsg_put(skb, 0, seq, &family, 0, cmd);
        } else
-               reply = genlmsg_put(skb, info->snd_pid, info->snd_seq,
-                               family.id, 0, 0,
-                               cmd, family.version);
+               reply = genlmsg_put_reply(skb, info, &family, 0, cmd);
        if (reply == NULL) {
                nlmsg_free(skb);
                return -EINVAL;
@@ -430,7 +425,7 @@ void taskstats_exit_alloc(struct taskstats **ptidstats, unsigned int *mycpu)
        *mycpu = raw_smp_processor_id();
 
        *ptidstats = NULL;
-       tmp = kmem_cache_zalloc(taskstats_cache, SLAB_KERNEL);
+       tmp = kmem_cache_zalloc(taskstats_cache, GFP_KERNEL);
        if (!tmp)
                return;