Protect a qcollapse call with an object lock before calling. The locks
need to be moved into the qcollapse and rcollapse routines, but I don't have time at the moment to make all the required changes...this will do for now.
This commit is contained in:
parent
d8ef68098b
commit
b9921222a2
@ -61,7 +61,7 @@
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: vm_object.c,v 1.16 1995/01/11 20:00:09 davidg Exp $
|
||||
* $Id: vm_object.c,v 1.17 1995/01/11 20:19:20 davidg Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -1319,18 +1319,23 @@ vm_object_collapse(object)
|
||||
*/
|
||||
if (object == NULL)
|
||||
return;
|
||||
if (object->paging_in_progress != 0) {
|
||||
if (object->shadow)
|
||||
vm_object_qcollapse(object);
|
||||
return;
|
||||
}
|
||||
/*
|
||||
* There is a backing object, and
|
||||
*/
|
||||
|
||||
/*
|
||||
* Make sure there is a backing object.
|
||||
*/
|
||||
if ((backing_object = object->shadow) == NULL)
|
||||
return;
|
||||
|
||||
if (object->paging_in_progress != 0) {
|
||||
if (backing_object) {
|
||||
if (vm_object_lock_try(backing_object)) {
|
||||
vm_object_qcollapse(object);
|
||||
vm_object_unlock(backing_object);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
vm_object_lock(backing_object);
|
||||
/*
|
||||
* ... The backing object is not read_only, and no pages in
|
||||
|
Loading…
x
Reference in New Issue
Block a user