Changeset View
Changeset View
Standalone View
Standalone View
sys/vm/vm_fault.c
Show First 20 Lines • Show All 1,661 Lines • ▼ Show 20 Lines | #endif | ||||
} | } | ||||
VM_OBJECT_WLOCK(dst_object); | VM_OBJECT_WLOCK(dst_object); | ||||
KASSERT(upgrade || dst_entry->object.vm_object == NULL, | KASSERT(upgrade || dst_entry->object.vm_object == NULL, | ||||
("vm_fault_copy_entry: vm_object not NULL")); | ("vm_fault_copy_entry: vm_object not NULL")); | ||||
if (src_object != dst_object) { | if (src_object != dst_object) { | ||||
dst_entry->object.vm_object = dst_object; | dst_entry->object.vm_object = dst_object; | ||||
dst_entry->offset = 0; | dst_entry->offset = 0; | ||||
if ((dst_entry->eflags & MAP_ENTRY_VN_EXEC) != 0) { | |||||
dst_entry->eflags &= ~MAP_ENTRY_VN_EXEC; | |||||
if (upgrade) | |||||
vm_map_entry_set_vnode_text(dst_entry, false); | |||||
markj: This is always a no-op since vm_map_entry_set_vnode_text() does nothing if MAP_ENTRY_VN_EXEC is… | |||||
kibAuthorUnsubmitted Done Inline ActionsYes, all is needed there only the flag clearing. New entry cannot cary text reference since new object does not inherit from old one. kib: Yes, all is needed there only the flag clearing. New entry cannot cary text reference since… | |||||
} | |||||
} | } | ||||
if (fork_charge != NULL) { | if (fork_charge != NULL) { | ||||
KASSERT(dst_entry->cred == NULL, | KASSERT(dst_entry->cred == NULL, | ||||
("vm_fault_copy_entry: leaked swp charge")); | ("vm_fault_copy_entry: leaked swp charge")); | ||||
dst_object->cred = curthread->td_ucred; | dst_object->cred = curthread->td_ucred; | ||||
crhold(dst_object->cred); | crhold(dst_object->cred); | ||||
*fork_charge += dst_object->charge; | *fork_charge += dst_object->charge; | ||||
} else if ((dst_object->type == OBJT_DEFAULT || | } else if ((dst_object->type == OBJT_DEFAULT || | ||||
▲ Show 20 Lines • Show All 165 Lines • Show Last 20 Lines |
This is always a no-op since vm_map_entry_set_vnode_text() does nothing if MAP_ENTRY_VN_EXEC is not set.