svn commit: r207290 - user/kmacy/head_page_lock_2/sys/vm

Kip Macy kmacy at FreeBSD.org
Tue Apr 27 19:47:39 UTC 2010


Author: kmacy
Date: Tue Apr 27 19:47:39 2010
New Revision: 207290
URL: http://svn.freebsd.org/changeset/base/207290

Log:
  add missed unlocks in vm_object_clean

Modified:
  user/kmacy/head_page_lock_2/sys/vm/vm_object.c

Modified: user/kmacy/head_page_lock_2/sys/vm/vm_object.c
==============================================================================
--- user/kmacy/head_page_lock_2/sys/vm/vm_object.c	Tue Apr 27 19:45:16 2010	(r207289)
+++ user/kmacy/head_page_lock_2/sys/vm/vm_object.c	Tue Apr 27 19:47:39 2010	(r207290)
@@ -844,6 +844,7 @@ vm_object_page_clean(vm_object_t object,
 			 * page (i.e. had to sleep) and always unlocks p.
 			 */
 			tscan += vm_object_page_collect_flush(object, p, curgeneration, pagerflags);
+			vm_page_unlock(p);
 		}
 
 		/*
@@ -920,17 +921,21 @@ again:
 		/* Always unlocks p. */
 		n = vm_object_page_collect_flush(object, p,
 			curgeneration, pagerflags);
-		if (n == 0)
+		if (n == 0) {
+			vm_page_unlock(p);
 			goto rescan;
+		}
 
-		if (object->generation != curgeneration)
+		if (object->generation != curgeneration) {
+			vm_page_unlock(p);
 			goto rescan;
-
+		}
 		/*
 		 * Try to optimize the next page.  If we can't we pick up
 		 * our (random) scan where we left off.
 		 */
 		if (msync_flush_flags & MSYNC_FLUSH_SOFTSEQ) {
+			vm_page_unlock(p);
 			if ((p = vm_page_lookup(object, pi + n)) != NULL)
 				goto again;
 		}


More information about the svn-src-user mailing list