diff options
Diffstat (limited to 'fs/buffer.c')
-rw-r--r-- | fs/buffer.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/buffer.c b/fs/buffer.c index 865570fe0d39..904d59d1eb8e 100644 --- a/fs/buffer.c +++ b/fs/buffer.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/hash.h> | 35 | #include <linux/hash.h> |
36 | #include <linux/suspend.h> | 36 | #include <linux/suspend.h> |
37 | #include <linux/buffer_head.h> | 37 | #include <linux/buffer_head.h> |
38 | #include <linux/task_io_accounting_ops.h> | ||
38 | #include <linux/bio.h> | 39 | #include <linux/bio.h> |
39 | #include <linux/notifier.h> | 40 | #include <linux/notifier.h> |
40 | #include <linux/cpu.h> | 41 | #include <linux/cpu.h> |
@@ -729,8 +730,10 @@ int __set_page_dirty_buffers(struct page *page) | |||
729 | 730 | ||
730 | write_lock_irq(&mapping->tree_lock); | 731 | write_lock_irq(&mapping->tree_lock); |
731 | if (page->mapping) { /* Race with truncate? */ | 732 | if (page->mapping) { /* Race with truncate? */ |
732 | if (mapping_cap_account_dirty(mapping)) | 733 | if (mapping_cap_account_dirty(mapping)) { |
733 | __inc_zone_page_state(page, NR_FILE_DIRTY); | 734 | __inc_zone_page_state(page, NR_FILE_DIRTY); |
735 | task_io_account_write(PAGE_CACHE_SIZE); | ||
736 | } | ||
734 | radix_tree_tag_set(&mapping->page_tree, | 737 | radix_tree_tag_set(&mapping->page_tree, |
735 | page_index(page), PAGECACHE_TAG_DIRTY); | 738 | page_index(page), PAGECACHE_TAG_DIRTY); |
736 | } | 739 | } |