dm writecache: handle DAX to partitions on persistent memory correctly
[linux-2.6-microblaze.git] / kernel / stacktrace.c
index c9ea7eb..946f44a 100644 (file)
@@ -142,7 +142,7 @@ unsigned int stack_trace_save_tsk(struct task_struct *tsk, unsigned long *store,
                .store  = store,
                .size   = size,
                /* skip this function if they are tracing us */
-               .skip   = skipnr + !!(current == tsk),
+               .skip   = skipnr + (current == tsk),
        };
 
        if (!try_get_task_stack(tsk))
@@ -233,10 +233,9 @@ unsigned int stack_trace_save_user(unsigned long *store, unsigned int size)
        if (current->flags & PF_KTHREAD)
                return 0;
 
-       fs = get_fs();
-       set_fs(USER_DS);
+       fs = force_uaccess_begin();
        arch_stack_walk_user(consume_entry, &c, task_pt_regs(current));
-       set_fs(fs);
+       force_uaccess_end(fs);
 
        return c.len;
 }
@@ -300,7 +299,7 @@ unsigned int stack_trace_save_tsk(struct task_struct *task,
                .entries        = store,
                .max_entries    = size,
                /* skip this function if they are tracing us */
-               .skip   = skipnr + !!(current == task),
+               .skip   = skipnr + (current == task),
        };
 
        save_stack_trace_tsk(task, &trace);