aboutsummaryrefslogtreecommitdiffstats
path: root/mm/page-writeback.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-04-14 19:49:17 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-14 19:49:17 -0400
commit1dcf58d6e6e6eb7ec10e9abc56887b040205b06f (patch)
treec03e7a25ef13eea62f1547914a76e5c68f3f4c28 /mm/page-writeback.c
parent80dcc31fbe55932ac9204daee5f2ebc0c49b6da3 (diff)
parente4b0db72be2487bae0e3251c22f82c104f7c1cfd (diff)
Merge branch 'akpm' (patches from Andrew)
Merge first patchbomb from Andrew Morton: - arch/sh updates - ocfs2 updates - kernel/watchdog feature - about half of mm/ * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (122 commits) Documentation: update arch list in the 'memtest' entry Kconfig: memtest: update number of test patterns up to 17 arm: add support for memtest arm64: add support for memtest memtest: use phys_addr_t for physical addresses mm: move memtest under mm mm, hugetlb: abort __get_user_pages if current has been oom killed mm, mempool: do not allow atomic resizing memcg: print cgroup information when system panics due to panic_on_oom mm: numa: remove migrate_ratelimited mm: fold arch_randomize_brk into ARCH_HAS_ELF_RANDOMIZE mm: split ET_DYN ASLR from mmap ASLR s390: redefine randomize_et_dyn for ELF_ET_DYN_BASE mm: expose arch_mmap_rnd when available s390: standardize mmap_rnd() usage powerpc: standardize mmap_rnd() usage mips: extract logic for mmap_rnd() arm64: standardize mmap_rnd() usage x86: standardize mmap_rnd() usage arm: factor out mmap ASLR into mmap_rnd ...
Diffstat (limited to 'mm/page-writeback.c')
-rw-r--r--mm/page-writeback.c19
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)
2111EXPORT_SYMBOL(account_page_dirtied); 2111EXPORT_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 */
2122void 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}
2130EXPORT_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 *