blk-mq: really fix plug list flushing for nomerge queues
[linux-2.6-block.git] / kernel / trace / ftrace.c
index 7e8d792da9630ee9db915e7e849de268ff999878..900dbb1efff2bb8554e3fa6edeb4172af3594d55 100644 (file)
@@ -3456,11 +3456,23 @@ struct ftrace_glob {
        int type;
 };
 
+/*
+ * If symbols in an architecture don't correspond exactly to the user-visible
+ * name of what they represent, it is possible to define this function to
+ * perform the necessary adjustments.
+*/
+char * __weak arch_ftrace_match_adjust(char *str, const char *search)
+{
+       return str;
+}
+
 static int ftrace_match(char *str, struct ftrace_glob *g)
 {
        int matched = 0;
        int slen;
 
+       str = arch_ftrace_match_adjust(str, g->search);
+
        switch (g->type) {
        case MATCH_FULL:
                if (strcmp(str, g->search) == 0)
@@ -5725,7 +5737,6 @@ static int alloc_retstack_tasklist(struct ftrace_ret_stack **ret_stack_list)
 {
        int i;
        int ret = 0;
-       unsigned long flags;
        int start = 0, end = FTRACE_RETSTACK_ALLOC_SIZE;
        struct task_struct *g, *t;
 
@@ -5741,7 +5752,7 @@ static int alloc_retstack_tasklist(struct ftrace_ret_stack **ret_stack_list)
                }
        }
 
-       read_lock_irqsave(&tasklist_lock, flags);
+       read_lock(&tasklist_lock);
        do_each_thread(g, t) {
                if (start == end) {
                        ret = -EAGAIN;
@@ -5759,7 +5770,7 @@ static int alloc_retstack_tasklist(struct ftrace_ret_stack **ret_stack_list)
        } while_each_thread(g, t);
 
 unlock:
-       read_unlock_irqrestore(&tasklist_lock, flags);
+       read_unlock(&tasklist_lock);
 free:
        for (i = start; i < end; i++)
                kfree(ret_stack_list[i]);