docs: ramdisk/initrd/initramfs corrections
[cascardo/linux.git] / kernel / taskstats.c
index 906cae7..7d4d7f9 100644 (file)
@@ -20,7 +20,6 @@
 #include <linux/taskstats_kern.h>
 #include <linux/tsacct_kern.h>
 #include <linux/delayacct.h>
-#include <linux/tsacct_kern.h>
 #include <linux/cpumask.h>
 #include <linux/percpu.h>
 #include <net/genetlink.h>
@@ -196,6 +195,8 @@ static int fill_pid(pid_t pid, struct task_struct *tsk,
 
        /* fill in basic acct fields */
        stats->version = TASKSTATS_VERSION;
+       stats->nvcsw = tsk->nvcsw;
+       stats->nivcsw = tsk->nivcsw;
        bacct_add_tsk(stats, tsk);
 
        /* fill in extended acct fields */
@@ -242,6 +243,8 @@ static int fill_tgid(pid_t tgid, struct task_struct *first,
                 */
                delayacct_add_tsk(stats, tsk);
 
+               stats->nvcsw += tsk->nvcsw;
+               stats->nivcsw += tsk->nivcsw;
        } while_each_thread(first, tsk);
 
        unlock_task_sighand(first, &flags);