Lines 3296-3303
vn_generic_copy_file_range(struct vnode *invp, off_t *
Link Here
|
3296 |
goto out; |
3296 |
goto out; |
3297 |
if (VOP_PATHCONF(invp, _PC_MIN_HOLE_SIZE, &holein) != 0) |
3297 |
if (VOP_PATHCONF(invp, _PC_MIN_HOLE_SIZE, &holein) != 0) |
3298 |
holein = 0; |
3298 |
holein = 0; |
3299 |
if (holein > 0) |
3299 |
error = vn_getsize_locked(invp, &insize, incred); |
3300 |
error = vn_getsize_locked(invp, &insize, incred); |
|
|
3301 |
VOP_UNLOCK(invp); |
3300 |
VOP_UNLOCK(invp); |
3302 |
if (error != 0) |
3301 |
if (error != 0) |
3303 |
goto out; |
3302 |
goto out; |
Lines 3333-3339
vn_generic_copy_file_range(struct vnode *invp, off_t *
Link Here
|
3333 |
*/ |
3332 |
*/ |
3334 |
if (error == 0) |
3333 |
if (error == 0) |
3335 |
error = vn_getsize_locked(outvp, &outsize, outcred); |
3334 |
error = vn_getsize_locked(outvp, &outsize, outcred); |
3336 |
if (error == 0 && outsize > *outoffp && outsize <= *outoffp + len) { |
3335 |
if (error == 0 && outsize > *outoffp && |
|
|
3336 |
*outoffp <= OFF_MAX - len && outsize <= *outoffp + len && |
3337 |
*inoffp < insize && |
3338 |
*outoffp <= OFF_MAX - (insize - *inoffp) && |
3339 |
outsize <= *outoffp + (insize - *inoffp)) { |
3337 |
#ifdef MAC |
3340 |
#ifdef MAC |
3338 |
error = mac_vnode_check_write(curthread->td_ucred, |
3341 |
error = mac_vnode_check_write(curthread->td_ucred, |
3339 |
outcred, outvp); |
3342 |
outcred, outvp); |