perf stat: Fix --no-scale
[linux-2.6-microblaze.git] / kernel / fork.c
index 935a42d..77059b2 100644 (file)
@@ -429,7 +429,7 @@ static void release_task_stack(struct task_struct *tsk)
 #ifdef CONFIG_THREAD_INFO_IN_TASK
 void put_task_stack(struct task_struct *tsk)
 {
-       if (atomic_dec_and_test(&tsk->stack_refcount))
+       if (refcount_dec_and_test(&tsk->stack_refcount))
                release_task_stack(tsk);
 }
 #endif
@@ -447,7 +447,7 @@ void free_task(struct task_struct *tsk)
         * If the task had a separate stack allocation, it should be gone
         * by now.
         */
-       WARN_ON_ONCE(atomic_read(&tsk->stack_refcount) != 0);
+       WARN_ON_ONCE(refcount_read(&tsk->stack_refcount) != 0);
 #endif
        rt_mutex_debug_task_free(tsk);
        ftrace_graph_exit_task(tsk);
@@ -717,7 +717,7 @@ static inline void put_signal_struct(struct signal_struct *sig)
 void __put_task_struct(struct task_struct *tsk)
 {
        WARN_ON(!tsk->exit_state);
-       WARN_ON(atomic_read(&tsk->usage));
+       WARN_ON(refcount_read(&tsk->usage));
        WARN_ON(tsk == current);
 
        cgroup_free(tsk);
@@ -867,7 +867,7 @@ static struct task_struct *dup_task_struct(struct task_struct *orig, int node)
        tsk->stack_vm_area = stack_vm_area;
 #endif
 #ifdef CONFIG_THREAD_INFO_IN_TASK
-       atomic_set(&tsk->stack_refcount, 1);
+       refcount_set(&tsk->stack_refcount, 1);
 #endif
 
        if (err)
@@ -896,7 +896,7 @@ static struct task_struct *dup_task_struct(struct task_struct *orig, int node)
         * One for us, one for whoever does the "release_task()" (usually
         * parent)
         */
-       atomic_set(&tsk->usage, 2);
+       refcount_set(&tsk->usage, 2);
 #ifdef CONFIG_BLK_DEV_IO_TRACE
        tsk->btrace_seq = 0;
 #endif