diff options
author | Edward Shishkin <edward.shishkin@gmail.com> | 2009-03-31 15:19:39 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-01 08:59:12 -0700 |
commit | e3a7cca1ef4c1af9b0acef9bd66eff6582a737b5 (patch) | |
tree | 717097ec82ce0de55e44b2fe3e35fa041e5169b2 /fs | |
parent | bd2f6199cf9af472aeefa1b642c9f504f19e6008 (diff) |
vfs: add/use account_page_dirtied()
Add a helper function account_page_dirtied(). Use that from two
callsites. reiser4 adds a function which adds a third callsite.
Signed-off-by: Edward Shishkin<edward.shishkin@gmail.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/buffer.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/fs/buffer.c b/fs/buffer.c index a2fd743d97c..73abe6d8218 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -621,14 +621,7 @@ static void __set_page_dirty(struct page *page, spin_lock_irq(&mapping->tree_lock); if (page->mapping) { /* Race with truncate? */ WARN_ON_ONCE(warn && !PageUptodate(page)); - - if (mapping_cap_account_dirty(mapping)) { - __inc_zone_page_state(page, NR_FILE_DIRTY); - __inc_bdi_stat(mapping->backing_dev_info, - BDI_RECLAIMABLE); - task_dirty_inc(current); - task_io_account_write(PAGE_CACHE_SIZE); - } + account_page_dirtied(page, mapping); radix_tree_tag_set(&mapping->page_tree, page_index(page), PAGECACHE_TAG_DIRTY); } |