diff options
-rw-r--r-- | fs/direct-io.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/direct-io.c b/fs/direct-io.c index 5981e17f46f0..45d34d807391 100644 --- a/fs/direct-io.c +++ b/fs/direct-io.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/slab.h> | 27 | #include <linux/slab.h> |
28 | #include <linux/highmem.h> | 28 | #include <linux/highmem.h> |
29 | #include <linux/pagemap.h> | 29 | #include <linux/pagemap.h> |
30 | #include <linux/task_io_accounting_ops.h> | ||
30 | #include <linux/bio.h> | 31 | #include <linux/bio.h> |
31 | #include <linux/wait.h> | 32 | #include <linux/wait.h> |
32 | #include <linux/err.h> | 33 | #include <linux/err.h> |
@@ -675,6 +676,13 @@ submit_page_section(struct dio *dio, struct page *page, | |||
675 | { | 676 | { |
676 | int ret = 0; | 677 | int ret = 0; |
677 | 678 | ||
679 | if (dio->rw & WRITE) { | ||
680 | /* | ||
681 | * Read accounting is performed in submit_bio() | ||
682 | */ | ||
683 | task_io_account_write(len); | ||
684 | } | ||
685 | |||
678 | /* | 686 | /* |
679 | * Can we just grow the current page's presence in the dio? | 687 | * Can we just grow the current page's presence in the dio? |
680 | */ | 688 | */ |