From 0e7dc2b1930d39cc2f2ae6189f0f0235daf230ba Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Mon, 14 Apr 2008 19:43:02 +0000 Subject: [PATCH] Don't free held clean pages when asked to clean. --- sys/vm/vm_object.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index c2b0e66b4..fff70d1af 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -62,7 +62,7 @@ * rights to redistribute these changes. * * $FreeBSD: src/sys/vm/vm_object.c,v 1.171.2.8 2003/05/26 19:17:56 alc Exp $ - * $DragonFly: src/sys/vm/vm_object.c,v 1.31 2007/06/08 02:00:47 dillon Exp $ + * $DragonFly: src/sys/vm/vm_object.c,v 1.32 2008/04/14 19:43:02 dillon Exp $ */ /* @@ -1605,12 +1605,15 @@ vm_object_page_remove_callback(vm_page_t p, void *data) /* * limit is our clean_only flag. If set and the page is dirty, do + * not free it. If set and the page is being held by someone, do * not free it. */ if (info->limit && p->valid) { vm_page_test_dirty(p); if (p->valid & p->dirty) return(0); + if (p->hold_count) + return(0); } /* -- 2.11.4.GIT