Merge branch 'for_linus' of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc
[pandora-kernel.git] / kernel / tsacct.c
index 96f7701..658f638 100644 (file)
@@ -22,8 +22,6 @@
 #include <linux/acct.h>
 #include <linux/jiffies.h>
 
-
-#define USEC_PER_TICK  (USEC_PER_SEC/HZ)
 /*
  * fill in basic accounting fields
  */
@@ -96,6 +94,15 @@ void xacct_add_tsk(struct taskstats *stats, struct task_struct *p)
        stats->write_char       = p->wchar;
        stats->read_syscalls    = p->syscr;
        stats->write_syscalls   = p->syscw;
+#ifdef CONFIG_TASK_IO_ACCOUNTING
+       stats->read_bytes       = p->ioac.read_bytes;
+       stats->write_bytes      = p->ioac.write_bytes;
+       stats->cancelled_write_bytes = p->ioac.cancelled_write_bytes;
+#else
+       stats->read_bytes       = 0;
+       stats->write_bytes      = 0;
+       stats->cancelled_write_bytes = 0;
+#endif
 }
 #undef KB
 #undef MB