From 63f6cefcd53de45d4fa3d4e6495d09b46478335d Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sun, 2 Nov 2003 22:52:42 +0000 Subject: [PATCH] - Increase the scope of two vm object locks in vm_object_split(). --- sys/vm/vm_object.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index be681111f08..abf4cf91413 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -1204,6 +1204,8 @@ vm_object_split(vm_map_entry_t entry) if (new_object == NULL) return; + VM_OBJECT_LOCK(new_object); + VM_OBJECT_LOCK(orig_object); source = orig_object->backing_object; if (source != NULL) { VM_OBJECT_LOCK(source); @@ -1218,8 +1220,6 @@ vm_object_split(vm_map_entry_t entry) orig_object->backing_object_offset + offset; new_object->backing_object = source; } - VM_OBJECT_LOCK(new_object); - VM_OBJECT_LOCK(orig_object); for (idx = 0; idx < size; idx++) { retry: m = vm_page_lookup(orig_object, offidxstart + idx);