]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - mm/rmap.c
__sched_setscheduler: don't do any policy checks when not "user"
[linux-2.6-omap-h63xx.git] / 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);
                }