fix locking bug in vm_object_terminate (from hibler)
authorKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Fri, 12 May 1995 03:52:42 +0000 (19:52 -0800)
committerKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Fri, 12 May 1995 03:52:42 +0000 (19:52 -0800)
SCCS-vsn: sys/vm/vm_object.c 8.7

usr/src/sys/vm/vm_object.c

index b18d431..20afb6f 100644 (file)
@@ -298,10 +298,8 @@ vm_object_terminate(object)
         *
         * XXX need to do something in the event of a cleaning error.
         */
         *
         * XXX need to do something in the event of a cleaning error.
         */
-       if ((object->flags & OBJ_INTERNAL) == 0) {
+       if ((object->flags & OBJ_INTERNAL) == 0)
                (void) vm_object_page_clean(object, 0, 0, TRUE, TRUE);
                (void) vm_object_page_clean(object, 0, 0, TRUE, TRUE);
-               vm_object_unlock(object);
-       }
 
        /*
         * Now free the pages.
 
        /*
         * Now free the pages.
@@ -314,8 +312,7 @@ vm_object_terminate(object)
                cnt.v_pfree++;
                vm_page_unlock_queues();
        }
                cnt.v_pfree++;
                vm_page_unlock_queues();
        }
-       if ((object->flags & OBJ_INTERNAL) == 0)
-               vm_object_unlock(object);
+       vm_object_unlock(object);
 
        /*
         * Let the pager know object is dead.
 
        /*
         * Let the pager know object is dead.