diff options
Diffstat (limited to 'mm/page-writeback.c')
| -rw-r--r-- | mm/page-writeback.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 644bcb665773..0372411f38fc 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c | |||
| @@ -2111,6 +2111,25 @@ void account_page_dirtied(struct page *page, struct address_space *mapping) | |||
| 2111 | EXPORT_SYMBOL(account_page_dirtied); | 2111 | EXPORT_SYMBOL(account_page_dirtied); |
| 2112 | 2112 | ||
| 2113 | /* | 2113 | /* |
| 2114 | * Helper function for deaccounting dirty page without writeback. | ||
| 2115 | * | ||
| 2116 | * Doing this should *normally* only ever be done when a page | ||
| 2117 | * is truncated, and is not actually mapped anywhere at all. However, | ||
| 2118 | * fs/buffer.c does this when it notices that somebody has cleaned | ||
| 2119 | * out all the buffers on a page without actually doing it through | ||
| 2120 | * the VM. Can you say "ext3 is horribly ugly"? Thought you could. | ||
| 2121 | */ | ||
| 2122 | void account_page_cleaned(struct page *page, struct address_space *mapping) | ||
| 2123 | { | ||
| 2124 | if (mapping_cap_account_dirty(mapping)) { | ||
| 2125 | dec_zone_page_state(page, NR_FILE_DIRTY); | ||
| 2126 | dec_bdi_stat(inode_to_bdi(mapping->host), BDI_RECLAIMABLE); | ||
| 2127 | task_io_account_cancelled_write(PAGE_CACHE_SIZE); | ||
| 2128 | } | ||
| 2129 | } | ||
| 2130 | EXPORT_SYMBOL(account_page_cleaned); | ||
| 2131 | |||
| 2132 | /* | ||
| 2114 | * For address_spaces which do not use buffers. Just tag the page as dirty in | 2133 | * For address_spaces which do not use buffers. Just tag the page as dirty in |
| 2115 | * its radix tree. | 2134 | * its radix tree. |
| 2116 | * | 2135 | * |
