From: Matthew Dillon Date: Wed, 30 Nov 2011 22:28:25 +0000 (-0800) Subject: kernel - Fix minor bug in last swapcache commit X-Git-Tag: v3.0.0~523 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/7a175765de62a14e3e3d660aac14f91810647a4e kernel - Fix minor bug in last swapcache commit * Fix an issue where the marker could get stuck at the end of the vm_object_list and stop the cleaning process. --- diff --git a/sys/vm/vm_swapcache.c b/sys/vm/vm_swapcache.c index 702ade4384..38aaf9b353 100644 --- a/sys/vm/vm_swapcache.c +++ b/sys/vm/vm_swapcache.c @@ -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); }