An important fix for proper inheritance of backing objects for

object splits.  Another excellent detective job by Tor.
Submitted by:	Tor Egge <Tor.Egge@idi.ntnu.no>
This commit is contained in:
dyson 1998-05-16 23:03:20 +00:00
parent 4c2eaaf8c8
commit 9b04841c1b

View File

@ -61,7 +61,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
* $Id: vm_map.c,v 1.124 1998/05/04 03:01:44 dyson Exp $
* $Id: vm_map.c,v 1.125 1998/05/04 17:12:52 dyson Exp $
*/
/*
@ -1942,7 +1942,7 @@ vm_map_split(entry)
vm_map_entry_t entry;
{
vm_page_t m;
vm_object_t orig_object, new_object;
vm_object_t orig_object, new_object, source;
vm_offset_t s, e;
vm_pindex_t offidxstart, offidxend, idx;
vm_size_t size;
@ -1967,6 +1967,19 @@ vm_map_split(entry)
if (new_object == NULL)
return;
source = orig_object->backing_object;
if (source != NULL) {
vm_object_reference(source); /* Referenced by new_object */
TAILQ_INSERT_TAIL(&source->shadow_head,
new_object, shadow_list);
source->flags &= ~OBJ_ONEMAPPING;
new_object->backing_object_offset =
orig_object->backing_object_offset + offidxstart;
new_object->backing_object = source;
source->shadow_count++;
source->generation++;
}
for (idx = 0; idx < size; idx++) {
vm_page_t m;