Lock the vm object when performing vm_object_clear_flag().

This commit is contained in:
Alan Cox 2003-01-02 09:09:27 +00:00
parent 3225a9881d
commit 81e4e48d24

View File

@ -97,8 +97,11 @@ vmtotal(SYSCTL_HANDLER_ARGS)
*/
GIANT_REQUIRED;
mtx_lock(&vm_object_list_mtx);
TAILQ_FOREACH(object, &vm_object_list, object_list)
TAILQ_FOREACH(object, &vm_object_list, object_list) {
vm_object_lock(object);
vm_object_clear_flag(object, OBJ_ACTIVE);
vm_object_unlock(object);
}
mtx_unlock(&vm_object_list_mtx);
/*
* Calculate process statistics.