cpuset,mm: fix no node to alloc memory when changing cpuset's mems
[safe/jmp/linux-2.6] / kernel / trace / trace_events.c
index 250ec86..c697c70 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/uaccess.h>
 #include <linux/module.h>
 #include <linux/ctype.h>
+#include <linux/slab.h>
 #include <linux/delay.h>
 
 #include <asm/setup.h>
@@ -60,10 +61,8 @@ int trace_define_field(struct ftrace_event_call *call, const char *type,
        return 0;
 
 err:
-       if (field) {
+       if (field)
                kfree(field->name);
-               kfree(field->type);
-       }
        kfree(field);
 
        return -ENOMEM;
@@ -520,14 +519,6 @@ out:
        return ret;
 }
 
-extern char *__bad_type_size(void);
-
-#undef FIELD
-#define FIELD(type, name)                                              \
-       sizeof(type) != sizeof(field.name) ? __bad_type_size() :        \
-       #type, "common_" #name, offsetof(typeof(field), name),          \
-               sizeof(field.name), is_signed_type(type)
-
 static ssize_t
 event_format_read(struct file *filp, char __user *ubuf, size_t cnt,
                  loff_t *ppos)
@@ -948,7 +939,7 @@ event_create_dir(struct ftrace_event_call *call, struct dentry *d_events,
                trace_create_file("enable", 0644, call->dir, call,
                                  enable);
 
-       if (call->id && call->profile_enable)
+       if (call->id && call->perf_event_enable)
                trace_create_file("id", 0444, call->dir, call,
                                  id);
 
@@ -965,10 +956,6 @@ event_create_dir(struct ftrace_event_call *call, struct dentry *d_events,
                                  filter);
        }
 
-       /* A trace may not want to export its format */
-       if (!call->show_format)
-               return 0;
-
        trace_create_file("format", 0444, call->dir, call,
                          format);