Changeset View
Changeset View
Standalone View
Standalone View
sys/vm/vm_fault.c
Show First 20 Lines • Show All 1,941 Lines • ▼ Show 20 Lines | #endif | ||||
} | } | ||||
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 || | ||||
dst_object->type == OBJT_SWAP) && | (dst_object->flags & OBJ_SWAP) != 0) && | ||||
dst_object->cred == NULL) { | dst_object->cred == NULL) { | ||||
KASSERT(dst_entry->cred != NULL, ("no cred for entry %p", | KASSERT(dst_entry->cred != NULL, ("no cred for entry %p", | ||||
dst_entry)); | dst_entry)); | ||||
dst_object->cred = dst_entry->cred; | dst_object->cred = dst_entry->cred; | ||||
dst_entry->cred = NULL; | dst_entry->cred = NULL; | ||||
} | } | ||||
/* | /* | ||||
▲ Show 20 Lines • Show All 151 Lines • Show Last 20 Lines |