diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index 781968f2db53..7a0951fb07ca 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -3143,7 +3143,7 @@ vn_generic_copy_file_range(struct vnode *invp, off_t *inoffp, rem = *inoffp % blksize; if (rem > 0) rem = blksize - rem; - if (len - rem > blksize) + if (len > rem && len - rem > blksize) len = savlen = rounddown(len - rem, blksize) + rem; }