svn commit: r233852 - user/attilio/vmcontention/sys/vm

Attilio Rao attilio at FreeBSD.org
Tue Apr 3 20:06:08 UTC 2012


Author: attilio
Date: Tue Apr  3 20:06:07 2012
New Revision: 233852
URL: http://svn.freebsd.org/changeset/base/233852

Log:
  The cached_pages_counter is not reset even when shared pages are present
  if the obj is not a vnode.
  
  Fix this.
  
  Reported and tested by:	flo

Modified:
  user/attilio/vmcontention/sys/vm/vm_object.c

Modified: user/attilio/vmcontention/sys/vm/vm_object.c
==============================================================================
--- user/attilio/vmcontention/sys/vm/vm_object.c	Tue Apr  3 19:34:00 2012	(r233851)
+++ user/attilio/vmcontention/sys/vm/vm_object.c	Tue Apr  3 20:06:07 2012	(r233852)
@@ -784,9 +784,10 @@ vm_object_terminate(vm_object_t object)
 		if (object->type == OBJT_VNODE)
 			vdrop(object->handle);
 	}
-	if (object->cached_page_count != 0 && object->type == OBJT_VNODE) {
+	if (object->cached_page_count != 0) {
 		object->cached_page_count = 0;
-		vdrop(object->handle);
+		if (object->type == OBJT_VNODE)
+			vdrop(object->handle);
 	}
 
 #if VM_NRESERVLEVEL > 0


More information about the svn-src-user mailing list