]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/direct-io.c
[PATCH] sched: improve migration accuracy
[linux-2.6-omap-h63xx.git] / fs / direct-io.c
index 5981e17f46f051afa98ec0b7af67c1b25a0dc897..45d34d80739112362be5a5d2e4eccbde0b30273d 100644 (file)
@@ -27,6 +27,7 @@
 #include <linux/slab.h>
 #include <linux/highmem.h>
 #include <linux/pagemap.h>
+#include <linux/task_io_accounting_ops.h>
 #include <linux/bio.h>
 #include <linux/wait.h>
 #include <linux/err.h>
@@ -675,6 +676,13 @@ submit_page_section(struct dio *dio, struct page *page,
 {
        int ret = 0;
 
+       if (dio->rw & WRITE) {
+               /*
+                * Read accounting is performed in submit_bio()
+                */
+               task_io_account_write(len);
+       }
+
        /*
         * Can we just grow the current page's presence in the dio?
         */