From 7e15fd27577744fa48ca9fde818f113b7bd52927 Mon Sep 17 00:00:00 2001 From: John Dyson Date: Fri, 21 Apr 1995 02:48:40 +0000 Subject: [PATCH] Fixed a problem in _vm_object_page_clean that could cause an infinite loop. --- sys/vm/vm_object.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index f1455159bf17..036a5ee9a995 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -61,7 +61,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: vm_object.c,v 1.42 1995/04/16 03:11:28 davidg Exp $ + * $Id: vm_object.c,v 1.43 1995/04/16 12:56:19 davidg Exp $ */ /* @@ -529,9 +529,11 @@ _vm_object_page_clean(object, start, end, syncio) if ((p->valid & p->dirty) != 0) { vm_offset_t tincr; tincr = vm_pageout_clean(p, VM_PAGEOUT_FORCE); - pgcount -= (tincr - 1); - tincr *= PAGE_SIZE; - tstart += tincr - PAGE_SIZE; + if( tincr) { + pgcount -= (tincr - 1); + tincr *= PAGE_SIZE; + tstart += tincr - PAGE_SIZE; + } allclean = 0; } }