]> err.no Git - linux-2.6/blobdiff - mm/rmap.c
sh: fix LIBGCC
[linux-2.6] / mm / rmap.c
index 99bc3f9cd796f34a58ec1d61798c27c583a0eaf3..94a5246a3f98b9e9b0ef71172bb184f561c0c294 100644 (file)
--- 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);
                }