aboutsummaryrefslogtreecommitdiff
path: root/mm/rmap.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-08-01 10:27:10 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-08-01 10:27:10 -0700
commit9fe3b64be3dc8313e9fa87255f169c608d074cbd (patch)
treec2b44acdf73d0ee4cbb67cbb2722c6eeeafa1d60 /mm/rmap.c
parent8b6d8c592fa7b8bfb1218447a273314c13a67e8a (diff)
parentab4227cb2d936886069ef1056c02500d05beb15d (diff)
Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6: [S390] qeth: avoid use of include/asm-s390 [S390] dont use kthread for smp_rescan_cpus(). [S390] virtio console: fix section mismatch warning. [S390] cio: Include linux/string.h in schid.h. [S390] qdio: fix section mismatch bug. [S390] stp: fix section mismatch warning. [S390] Remove diag 0x260 call from memory detection. [S390] qdio: make sure qdr is aligned to page size [S390] Add support for memory hot-remove. [S390] Wire up new syscalls. [S390] cio: Memory allocation for idset changed. [S390] qeth: preallocated qeth header for hiper socket [S390] Optimize storage key operations for anon pages [S390] nohz/sclp: disable timer on synchronous waits. [S390] ipl: Reboot from alternate device does not work when booting from file [S390] dasd: Add support for enhanced VM UID [S390] Remove last P390 trace.
Diffstat (limited to 'mm/rmap.c')
-rw-r--r--mm/rmap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/rmap.c b/mm/rmap.c
index 99bc3f9cd79..94a5246a3f9 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -667,7 +667,8 @@ void page_remove_rmap(struct page *page, struct vm_area_struct *vma)
* Leaving it set also helps swapoff to reinstate ptes
* faster for those pages still in swapcache.
*/
- if (page_test_dirty(page)) {
+ if ((!PageAnon(page) || PageSwapCache(page)) &&
+ page_test_dirty(page)) {
page_clear_dirty(page);
set_page_dirty(page);
}