kernel - Fix minor bug in last swapcache commit
authorMatthew Dillon <dillon@apollo.backplane.com>
Wed, 30 Nov 2011 22:28:25 +0000 (14:28 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Wed, 30 Nov 2011 22:28:25 +0000 (14:28 -0800)
* Fix an issue where the marker could get stuck at the end of the
  vm_object_list and stop the cleaning process.

sys/vm/vm_swapcache.c

index 702ade4..38aaf9b 100644 (file)
@@ -737,6 +737,14 @@ vm_swapcache_cleaning(vm_object_t marker)
                if (count < 0)
                        break;
        }
+
+       /*
+        * If we wound up at the end of the list this will move the
+        * marker back to the beginning.
+        */
+       if (object == NULL)
+               vm_swapcache_movemarker(marker, NULL);
+
        lwkt_reltoken(&vmobj_token);
 }