Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/kern_sendfile.c
Show First 20 Lines • Show All 863 Lines • ▼ Show 20 Lines | if (vp != NULL) { | ||||
/* | /* | ||||
* Check to see if the file size has changed. | * Check to see if the file size has changed. | ||||
*/ | */ | ||||
if (obj->type == OBJT_VNODE) { | if (obj->type == OBJT_VNODE) { | ||||
VM_OBJECT_RLOCK(obj); | VM_OBJECT_RLOCK(obj); | ||||
nobj_size = obj->un_pager.vnp.vnp_size; | nobj_size = obj->un_pager.vnp.vnp_size; | ||||
VM_OBJECT_RUNLOCK(obj); | VM_OBJECT_RUNLOCK(obj); | ||||
} else { | } else { | ||||
error = VOP_GETATTR(vp, &va, td->td_ucred); | error = VOP_GETATTR(vp, 0, &va, td->td_ucred); | ||||
if (error != 0) { | if (error != 0) { | ||||
VOP_UNLOCK(vp); | VOP_UNLOCK(vp); | ||||
goto done; | goto done; | ||||
} | } | ||||
nobj_size = va.va_size; | nobj_size = va.va_size; | ||||
} | } | ||||
if (off >= nobj_size) { | if (off >= nobj_size) { | ||||
VOP_UNLOCK(vp); | VOP_UNLOCK(vp); | ||||
▲ Show 20 Lines • Show All 493 Lines • Show Last 20 Lines |