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 ...
This commit is contained in:
15
mm/filemap.c
15
mm/filemap.c
@@ -202,16 +202,15 @@ void __delete_from_page_cache(struct page *page, void *shadow)
|
||||
BUG_ON(page_mapped(page));
|
||||
|
||||
/*
|
||||
* Some filesystems seem to re-dirty the page even after
|
||||
* the VM has canceled the dirty bit (eg ext3 journaling).
|
||||
* At this point page must be either written or cleaned by truncate.
|
||||
* Dirty page here signals a bug and loss of unwritten data.
|
||||
*
|
||||
* Fix it up by doing a final dirty accounting check after
|
||||
* having removed the page entirely.
|
||||
* This fixes dirty accounting after removing the page entirely but
|
||||
* leaves PageDirty set: it has no effect for truncated page and
|
||||
* anyway will be cleared before returning page into buddy allocator.
|
||||
*/
|
||||
if (PageDirty(page) && mapping_cap_account_dirty(mapping)) {
|
||||
dec_zone_page_state(page, NR_FILE_DIRTY);
|
||||
dec_bdi_stat(inode_to_bdi(mapping->host), BDI_RECLAIMABLE);
|
||||
}
|
||||
if (WARN_ON_ONCE(PageDirty(page)))
|
||||
account_page_cleaned(page, mapping);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user