mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-27 09:02:06 +00:00
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>
This commit is contained in:
parent
bd2f6199cf
commit
e3a7cca1ef
3 changed files with 17 additions and 15 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue