]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - mm/vmscan.c
[PATCH] SwapMig: Drop unused pages immediately
[linux-2.6-omap-h63xx.git] / mm / vmscan.c
index 5393b093a87ba898bb88aec37691bbd795186580..73ba4046ed272eb290cea68dca37d02a5ae64092 100644 (file)
@@ -689,6 +689,11 @@ redo:
        list_for_each_entry_safe(page, page2, l, lru) {
                cond_resched();
 
+               if (page_count(page) == 1) {
+                       /* page was freed from under us. So we are done. */
+                       move_to_lru(page);
+                       continue;
+               }
                /*
                 * Skip locked pages during the first two passes to give the
                 * functions holding the lock time to release the page. Later we