Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/kern_proc.c
Show First 20 Lines • Show All 2,484 Lines • ▼ Show 20 Lines | if (lobj) { | ||||
kve->kve_ref_count = obj->ref_count; | kve->kve_ref_count = obj->ref_count; | ||||
kve->kve_shadow_count = obj->shadow_count; | kve->kve_shadow_count = obj->shadow_count; | ||||
VM_OBJECT_RUNLOCK(obj); | VM_OBJECT_RUNLOCK(obj); | ||||
if (vp != NULL) { | if (vp != NULL) { | ||||
vn_fullpath(vp, &fullpath, &freepath); | vn_fullpath(vp, &fullpath, &freepath); | ||||
cred = curthread->td_ucred; | cred = curthread->td_ucred; | ||||
vn_lock(vp, LK_SHARED | LK_RETRY); | vn_lock(vp, LK_SHARED | LK_RETRY); | ||||
if (VOP_GETATTR(vp, &va, cred) == 0) { | if (VOP_GETATTR(vp, 0, &va, cred) == 0) { | ||||
kve->kve_fileid = va.va_fileid; | kve->kve_fileid = va.va_fileid; | ||||
/* truncate */ | /* truncate */ | ||||
kve->kve_fsid = va.va_fsid; | kve->kve_fsid = va.va_fsid; | ||||
} | } | ||||
vput(vp); | vput(vp); | ||||
} | } | ||||
} else { | } else { | ||||
kve->kve_type = KVME_TYPE_NONE; | kve->kve_type = KVME_TYPE_NONE; | ||||
▲ Show 20 Lines • Show All 203 Lines • ▼ Show 20 Lines | if (lobj != NULL) { | ||||
kve->kve_ref_count = obj->ref_count; | kve->kve_ref_count = obj->ref_count; | ||||
kve->kve_shadow_count = obj->shadow_count; | kve->kve_shadow_count = obj->shadow_count; | ||||
VM_OBJECT_RUNLOCK(obj); | VM_OBJECT_RUNLOCK(obj); | ||||
if (vp != NULL) { | if (vp != NULL) { | ||||
vn_fullpath(vp, &fullpath, &freepath); | vn_fullpath(vp, &fullpath, &freepath); | ||||
kve->kve_vn_type = vntype_to_kinfo(vp->v_type); | kve->kve_vn_type = vntype_to_kinfo(vp->v_type); | ||||
cred = curthread->td_ucred; | cred = curthread->td_ucred; | ||||
vn_lock(vp, LK_SHARED | LK_RETRY); | vn_lock(vp, LK_SHARED | LK_RETRY); | ||||
if (VOP_GETATTR(vp, &va, cred) == 0) { | if (VOP_GETATTR(vp, 0, &va, cred) == 0) { | ||||
kve->kve_vn_fileid = va.va_fileid; | kve->kve_vn_fileid = va.va_fileid; | ||||
kve->kve_vn_fsid = va.va_fsid; | kve->kve_vn_fsid = va.va_fsid; | ||||
kve->kve_vn_fsid_freebsd11 = | kve->kve_vn_fsid_freebsd11 = | ||||
kve->kve_vn_fsid; /* truncate */ | kve->kve_vn_fsid; /* truncate */ | ||||
kve->kve_vn_mode = | kve->kve_vn_mode = | ||||
MAKEIMODE(va.va_type, va.va_mode); | MAKEIMODE(va.va_type, va.va_mode); | ||||
kve->kve_vn_size = va.va_size; | kve->kve_vn_size = va.va_size; | ||||
kve->kve_vn_rdev = va.va_rdev; | kve->kve_vn_rdev = va.va_rdev; | ||||
▲ Show 20 Lines • Show All 880 Lines • Show Last 20 Lines |